开发者

Where does Glassfish 2.1 stores cached JSP?

开发者 https://www.devze.com 2023-03-06 07:22 出处:网络
I\'m looking for some information I haven\'t found anywhere else, as title says: I cannot find where glassfish is storing JSP pages upon runtime compilation, I already looked in the following director

I'm looking for some information I haven't found anywhere else, as title says: I cannot find where glassfish is storing JSP pages upon runtime compilation, I already looked in the following directories:

  • WEB-INF/jsp under my deployed EAR, doesn't exist
  • domain1/generated/jsp/j2ee-apps/etc etc has no .java files
  • I made a search in the whole glassfish folder and I didn't find any .java files related to JSPs...
  • 开发者_JS百科

Any other hint?

Do I have to setup Glassfish in some way? Setup some properties? (I set jspCachingEnabled=true in the web-container only)

Thanks in advance.


GlassFish does not keep the generated java sources for a jsp after they have been compiled by default. You can change that by adding the following snippet into your sun-web.xml file...

  <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 a war 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 a war file (mywebapp.war) that is part of an 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
0

精彩评论

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