users@glassfish.java.net

Re: What does GlassFish V2 put the java file translated from jsp.

From: <glassfish_at_javadesktop.org>
Date: Tue, 01 Apr 2008 05:44:43 PST

You can find the generated Servlet code in the "generated" folder of your domain. So for the default-domain "domain1" and a web module named "test" this would be

GLASSFISH_HOME/domains/domain1/generated/jsp/j2ee-modules/test/org/apache/jsp

For JDK 1.5 all JSPs will be translated to servlets and the servlet code would be visible here. With JDK 6 things are a bit different. For performance reasons JSP-compilation is done in memory only so you won't see a file _unless_ you specify to the JspServlet to keep generated files.

You can do so in the file GLASSFISH_HOME/domains/domain1/config/default-web.xml. Add the following lines to the servlet-element for the Jsp-Servlet after the line containing "<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>":

   <init-param>
     <param-name>keepgenerated</param-name>
     <param-value>true</param-value>
   </init-param>

--
Wolfram Rittmeyer
[Message sent by forum member 'writtmeyer' (writtmeyer)]
http://forums.java.net/jive/thread.jspa?messageID=267061