wood burning stoves 2.0*
The moose likes Websphere and the fly likes Batch Compile JSP - included JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Batch Compile JSP - included JSPs" Watch "Batch Compile JSP - included JSPs" New topic
Author

Batch Compile JSP - included JSPs

verduka fox
Ranch Hand

Joined: Jan 18, 2001
Posts: 178
I have been working with IBM to determine how to precompile my JSPs when I deploy a new version of my application. I am aware of the JspBatchCompiler.sh script in the bin directory of WebSphere/AppServer. My question concerns the compilation of included JSPs. After running the Batch Compiler, the JSPs that are included in other JSPs don't compile. They contain object references that were instantiated in the "parent" JSP instead of inside the included JSP. For example, in MyFile.jsp, I create
Person p = databasebean.getPerson();
and then include MyIncludedFile.jsp as:
<%@ include file="MyIncludedFile.jsp" %>
Inside MyIncludedFile.jsp, I print out details about the person, such as:
<%= p.getName() %>
When MyIncludedFile.jsp is compiled, it won't compile because of the reference to p that was instantiated in MyFile.jsp (not in MyIncludedFile.jsp).
When I contacted IBM about this, they responded as follows:
JspBatchCompiler will attempt to batch compile all files inside of the WAR that end with (.jsp , .jsw, .jsv).
1) Check that the top level jsp that is doing all of the static includes is compiling correctly.
2) If a jsp cannot stand on it's own (ie contains references across multiple jsp's), then L3 is suggesting what JSP 1.2 suggests
and that is to use a different naming convention for these jsp fragments since they are not complete jsp's (ie myjsp.jspf or jsp.jsf) The jsp processor is unable to distinguish between a complete jsp and a jsp that is going to require other jsp code to be included at compilation time.
Can anyone comment on this? I have always used the '.jsp' extension on my JSPs. Are there any implications of naming them as '.jspf' or '.jsf'. What do '.jspf' and '.jsf' stand for? What is the "standard" naming convention in this case ('.jspf' or '.jsf')?
Thanks for your help!
 
 
subject: Batch Compile JSP - included JSPs
 
Similar Threads
Is it possible to use [jsp:include] in a JSP Tag File?
Scriptlets and expressions not executing in JSP page
Problem with jspc task
erratic jspf behaviour
Subview