Where does Eclipse store generated servlet files for Tomcat?
Solution 1
Doubleclick the server entry in Servers view and check the path represented by Server path. Explore in there from inside the workspace directory. The generated classes are there.
If you choose the 2nd option Use Tomcat installation, then it will be available Tomcat's /work
folder, there where you expected it to be.
Solution 2
go to your application work space directory(not eclipse installation directory) in windows explorer(not in eclipse IDE explorer).
in my laptop it is d:/applicationdata/j2ee then follow the path as:
work space directory(in my case j2ee)/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/catalina/localhost
here u will find your application
Solution 3
Eclipse doesn't generate servlet files for JSP files. Validation happens directly on JSP syntax. When a JSP is deployed to an app server like Tomcat, the server may choose to generate servlet files to disk, but that is not required. The generation and compilation can happen in memory or the app server may even compile JSP files directly to bytecode.
I don't know specifically about Tomcat, but if it does generate servlet files to disk, the temporary directory containing these files will be somewhere under your Tomcat install.
Tom Tucker
Updated on July 09, 2022Comments
-
Tom Tucker almost 2 years
I'm using Eclipse Java EE IDE and launch Tomcat from the Server's tab on Eclipse.
Where does Eclipse store generated servlet .java files for JSP files? I've checked the Tomcat installation directory, but nothing there.
Thanks.
-
Tom Tucker over 13 yearsThanks, but somehow all the radio buttons for "Server Locations" are disabled so it wouldn't even let me see the entire value for the Server path. Any idea how to enable the buttons so that I can see the value?
-
BalusC over 13 yearsRead the 2nd sentence of 1st paragraph in the Server Locations dialogue.