Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the generated JSP class files located?

Tags:

java

eclipse

jsp

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.

like image 474
tt0686 Avatar asked Nov 30 '22 03:11

tt0686


2 Answers

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.

like image 118
BalusC Avatar answered Dec 01 '22 15:12

BalusC


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.

like image 40
Alfabravo Avatar answered Dec 01 '22 17:12

Alfabravo