Thursday, June 16, 2011

Precompiling JSP Files in WCS

Expand the enterprise application archive using the following command. WAS_installdir/bin/EARExpander -ear /mytmp/WC_instance.ear -operationDir /mytmp/WC_instance.expanded.ear -operation expand -expansionFlags war

· Change the JSP Engine parameters. You want to ensure that the JSP engine will not compile any JSP files for the Stores Web module at run time. This ensures that your precompiled JSP files from the WEB-INF directory is used.

o Open /mytmp/WC_instance.expanded.ear/Stores.war/ibm-web-ext.xmi in a text editor.

o Add the following line before the line

</webappext:WebAppExtension>

< xmi:id="JSPAttribute_2" name="disableJspRuntimeCompilation"

value="true"/>>

Ensure that the xmi:id of the new line is unique within the file.

o Run the JSP batch compiler using the command WAS_installDir/bin/JspBatchCompiler -ear.path /mytmp/WC_jbweb1.expanded.ear -webmodule.name Stores.war -compileToWebInf true

o Since you disabled runtime compilation in Step 3, you must review the log to ensure that all JSP files compiled without error. If some JSP files are not compiled, correct the error and run the compilation step again

No comments:

Post a Comment