开发者

Where does Eclipse store generated servlet files for Tomcat?

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.

Th开发者_开发技巧anks.


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.

Where does Eclipse store generated servlet files for Tomcat?


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.


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


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.


/home/waheguru/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/jspnotes/org/apache/jsp

localhost or your website name, project name is jspnotes, whatever your project.

This path is shown in Linux Mint.


Check META-INF\context.xml file from your work space. There will be path metioned like below

workDir="C:\apache-tomcat-7.0.39\work"

In above path you will find the package structure of your project and in it there will be both *_jsp.java and *_jsp.class

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜