Where does Glassfish 2.1 store the cached JSP?

I am looking for some information that I have not found anywhere else, because the name says: I can not find where the glass fish stores JSP pages at compile time at runtime, I already looked in the following directories:

  • WEB-INF / jsp does not exist under my deployed EAR
  • domain1 / generated / jsp / j2ee-apps / etc etc. does not have .java files
  • I did a search in the folder for all the glass fish and I did not find any .java files associated with JSP ...

Any other clues?

Should I somehow customize Glassfish? Customize some properties? (I set jspCachingEnabled = true only in the web container)

Thanks in advance.

+7
source share
1 answer

GlassFish does not save the generated java sources for jsp after compiling them by default. You can change this by adding the following snippet to your sun-web.xml ...

<jsp-config> <property name="keepgenerated" value="true"> <description>Keep a copy of the generated servlet class' java code.</description> </property> 

If your jsp (mypage.jsp) is in the military file (mywebapp.war) then the java file will be under

 %GLASSFISH_HOME%\domains\domain1\generated\jsp\j2ee-modules\mywebapp_war\org\apache\jsp\mypage_jsp.java 

If your jsp (mypage.jsp) is in the military file (mywebapp.war), which is part of the EAR (myentapp.ear), then the java file will be under

 %GLASSFISH_HOME%\domains\domain1\generated\jsp\j2ee-apps\myentapp\mywebapp_war\org\apache\jsp\mypage_jsp.java 
+10
source

All Articles