Sun Java System Portal Server 7.1 Developer Sample Guide

JavaServer Page Caching Information

When the system compiles JavaServer PagesTM (JSP), the result is only one JavaTM class per parent JSP. There is no compiled class for the static included JSPs. Thus, when you change an included JSP, you need to run the touch command on the parent JSP to recompile the parent JSP with the changed JSP. The Portal Server software JSP engine checks the last modification time on the compiled class and the JSP file to see if the JSP needs to be recompiled. In this way, the change takes effect immediately.

To find a JSP’s parent JSP, search in the JSP for the string <%@ include file="filename.jsp" %>. Some JSPs are dynamically included by using the <jsp:include page="header.jsp" flush="true"/> syntax instead of <%@ include file="header.jsp" %>. This syntax compiles header.jsp and generates a separate Java class.

The path to cached JSPs is constructed in such a way so that the compiled JSPs do not conflict with each other in multi-server instances, when multiple Desktop types contain the same JSPs and for multiple clientTypes and locales. So when JSPs are dynamically included, the touch command does not need to be run for the parent JSP.