File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes servlet code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "servlet code" Watch "servlet code" New topic

servlet code

Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 423
Hi, Where do we see Servlet code after .jsp page is compiled into .java servlet code in tomcat.

OCPJP 6.0-81% | Preparing for OCWCD | |
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

In the work folder.

[Asking smart questions] [About Bear] [Books by Bear]
Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 423
work folder is empty for me.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17416

Harikrishna Gorrepati wrote:work folder is empty for me.

I think there's a Tomcat option that determines whether or not the generated Java code for a JSP is deleted after being compiled. However, the class file should still be there in TOMCAT_HOME/work/Catalina/localhost/appname/.

JSPs are typically compiled on-demand, however, so if no one has yet requested the page, neither the Java source nor classfiles will exist yet.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: servlet code
It's not a secret anymore!