tags:

views:

26

answers:

1

I added <init-param> for keepgenerated with a value of true that is default value according to spec for servlet <servlet-name>jsp</servlet-name> in CATALINA_HOME/conf/web.xml.

But the generated JSP servlet is not available in work directory. Can anybody explain what I'm doing wrong?

A: 

Here's a cite from Tomcat 7's Jasper documentation:

keepgenerated - Should we keep the generated Java source code for each page instead of deleting it? true or false, default true.

So, it defaults to true. If you didn't explicitly set it to false, then there are several possible causes for this particular problem:

  • It is simply not been generated yet. Open the JSP page in the webbrowser and recheck.
  • The generation has failed due to a compile/build error. Read the server error logs for details.
  • The generated file is not stored there where you expect it is. This can happen when you're taking control of Tomcat over by some 3rd party tool like the server plugin of the IDE you're using. For example the Tomcat plugin of Eclipse stores it somewhere in the depths of the workspace metadata folder.
BalusC
thx, you are right, i started tomcat not from ide and jsp java file is present)