Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Where exactly does a jsp page get deployed when run via Eclipse?
Where exactly does a jsp page get deployed when run via Eclipse? [message #1179656] Sun, 10 November 2013 12:45 Go to next message
nav k is currently offline nav kFriend
Messages: 3
Registered: November 2013
Junior Member
I created a new default web application project which had an index.jsp. I had already pointed Eclipse to the place I had extracted Tomcat (C:\apache-tomcat-7.0.42).

I ran the program, the browser opened and the index.jsp file was displayed.

What I don't understand is, that the index.jsp file was not automatically copied to the Tomcat folder and it still worked. I thought that for a file to work, it had to be copied to the C:\apache-tomcat-7.0.42\webapps\ROOT\WEB-INF folder.

How does Eclipse manage to execute the index.jsp file without copying it to the Tomcat folder?
When I run the program in Eclipse, it shows that it is starting the Tomcat server. Is it starting the same server in C:\apache-tomcat-7.0.42 or is it creating a separate 'virtual' kind of an instance of the server and running it in the Eclipse workspace?

My catalina base folder points to C:\apache-tomcat-7.0.42 but when I created my servlet project, the NameHandler.class file got created in F:\Programming\Java\HelloWeb\build\web\WEB-INF\classes\org\mypackage\hello. I searched the tomcat directory, and the .class file wasn't there. Nor was any trace of my HelloWeb project. So my question persists, as to how the program works even if the .class file does not actually get deployed in the tomcat directory?
Re: Where exactly does a jsp page get deployed when run via Eclipse? [message #1179764 is a reply to message #1179656] Sun, 10 November 2013 14:30 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
please ask in the Web Tools forum,
good luck
Stephan
Re: Where exactly does a jsp page get deployed when run via Eclipse? [message #1182354 is a reply to message #1179764] Tue, 12 November 2013 06:10 Go to previous message
Arnav Kumar is currently offline Arnav KumarFriend
Messages: 16
Registered: October 2013
Junior Member
As you have said you are using eclipse which does executes all the necessary commands to run. You just have a project in any drive with the well defined structure (Eclipse does it for you). JAVA_HOME, CATALINA_HOME and classpath should be correct. Now after compiling the code you have to give the correct context root to the browser. It does not matter which drive is using by context root and which one is using by apache tomcat. For more details you may go to TKHTS.com


TechKnowHeights
Previous Topic:Compile errors not detected until file save
Next Topic:Set default VM arguments for all JUnit Tests?
Goto Forum:
  


Current Time: Thu Mar 28 22:25:11 GMT 2024

Powered by FUDForum. Page generated in 0.02259 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top