4

I am using Tomcat 7.1 and Eclipse Indigo to develop a Java Web Application. I just want to ask if anybody knows where the JSP translated files (the java files) are stored? Its often i receive exceptions indicating the jsp java file line, but if i can not see the file it is more difficult to correct the bug.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
tt0686
  • 1,771
  • 6
  • 31
  • 60
  • Possible duplicate of [Where does Eclipse store generated servlet files for Tomcat?](http://stackoverflow.com/questions/4543868/where-does-eclipse-store-generated-servlet-files-for-tomcat) – fredoverflow May 04 '17 at 09:30

3 Answers3

13

Doubleclick the Tomcat entry in Servers tab in Eclipse. You'll see something like this in Server Locations section:

enter image description here

If you haven't changed the server path and it thus defaults to Eclipse's workspace metadata, then the Tomcat's /work directory is not in Tomcat's own installation folder, but in the path as shown in the above screenshot.


Unrelated to the concrete problem, if you adhere the JSP coding recommendations and you avoid Java code in JSP altogether, then debugging will be so much easier, along with a lot of other advantages.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • or those who cannot view the image, the path is .plugins\org.eclipse.wst.server.core\tmp1\work\Catalina\localhost\\org\apache\jsp\WEB_002dINF\jsp – Vishnu Feb 09 '17 at 13:14
8

The JSP translated files are stored (in Tomcat) in /work/Catalina/localhost/[your_app_context]/org/apache/jsp/.

Should check in other containers or web servers.

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
Alfabravo
  • 7,493
  • 6
  • 46
  • 82
  • @tt0686 They'll be in the Eclipse directories somewhere, not in the TC work directory. – Dave Newton Jan 02 '12 at 14:14
  • 1
    @tt0686 Are you using Eclipse-Tomcat integration? If your Tomcat `work` directory is empty and you are using Eclipse-Tomcat integration it _could_ be placing the generated Java and class files under Eclipse's build directory. – Sri Sankaran Jan 02 '12 at 14:16
  • If you run jsp on server, they will be in work directory. In other cases, they will probably be in some other place. – Alfabravo Jan 02 '12 at 14:18
1

you can find the jsp compailed java classes in your workspace: And the path is: workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\auctuus\org\apache\jsp\jsp\gbp\settings