Tutorials > Customize > Deploy precompiled JSP files to the WebSphere Commerce Server

< Previous | Next >


Precompile the JSP files

WAS includes a command line utility and an Ant task to...

This tool can work on an application that is already installed in WAS, or on an EAR file in any directory of the file system. In this task, you'll precompile all of the JSP files for the Stores Web Module. The JSP compiler places a .class file for each JSP under the...

Stores.war/WEB-INF/classes

At run time, the JSP engine uses an algorithm to determine which compiled JSP file to use.

The steps to precompile the JSP files can be done as part of the application build process.


Procedure

  1. Export the current WebSphere Commerce enterprise application archive.

    PROFILE_HOME/bin/wsadmin -c '$AdminApp export WC_instance /mytmp/WC_instance.ear'

    If you put the enterprise application EAR file in the standard temporary directory, the JSPBatchCompiler reports errors.

  2. Expand the enterprise application archive.

    WAS_HOME/bin/EARExpander -ear /mytmp/WC_instance.ear -operationDir /mytmp/WC_instance.expanded.ear -operation expand -expansionFlags war

  3. Run the JSP batch compiler.

    WAS_HOME/bin/JspBatchCompiler -ear.path /mytmp/WC_jbweb1.expanded.ear -webmodule.name Stores.war -compileToWebInf true

  4. Since you disabled runtime compilation in Step 3, 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.

< Previous | Next >


+

Search Tips   |   Advanced Search