This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Batch Compile JSP - included JSPs

Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 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!
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic