Compiling JavaServer Page files
Compiling the JavaServer Page (JSP) files in your site or store will significantly reduce the amount of time needed to load your store. As a result, IBM recommends that you batch-compile your store or site JSP files after publishing a store archive and after deploying JSP files to a production environment.
If you are deploying J2EE assets, and those assets contain JSP files, ensure you compile your JSP files. Regardless of whether you deploy a single file, a partial application, or an entire module, you should do this if there are JSP files involved.
- Start a command line session.
- Change to the following directory: WC_profiledir/bin
- To compile all WebSphere Commerce JSP files, run the following command:
AIX|Linux|
JspBatchCompiler.sh -enterpriseapp.name "WC_ instance" -webmodule.name "Stores.war" -compileToWebInf false -cell.name " cellname" -node.name " nodename" -server.name "server1"
JspBatchCompiler -enterpriseapp.name "WC_ instance" -webmodule.name "Stores.war" -compileToWebInf false -cell.name " cellname" -node.name " nodename" -server.name "server1" -profileName "WAS_instance"
I5/OS|If a default WAS instance is used, the -cell.name and -node.name parameters are set to the i5/OS hostname by default. If a non-default WAS instance is used, the -cell.name and -node.name parameters are set to the hostname_WAS_instance by default.
JspBatchCompiler.bat -enterpriseapp.name "WC_ instance" -webmodule.name "Stores.war" -compileToWebInf false -cell.name " cellname" -node.name " nodename" -server.name "server1"
JspBatchCompiler.bat -enterpriseapp.name "WC" -webmodule.name "Stores.war" -compileToWebInf false -cell.name "localhost" -node.name "localhost" -server.name "server1"
Where:
- instance
- is the name of the WebSphere Commerce instance for which you are compiling the JSP files. The name of the default WebSphere Commerce instance is demo.
- cellname
- is the name of your cell. The default value is WC_ instance_cell.
- nodename
- is the name of your node that runs WebSphere Commerce. The default value is WC_ instance_node.
To compile all of the WebSphere Commerce JSP files for your site, omit the -webmodule.name "Stores.war" option.
Several errors are logged when you perform these compiles. You can safely ignore these errors.
- To compile all of the WebSphere Commerce Payments JSP files for your site, run the following command:
AIX|Linux|
JspBatchCompiler.sh -enterpriseapp.name " payment_instance_Commerce_Payments_App" -compileToWebInf false -cell.name " cellname" -node.name " nodename" -server.name " instance_Commerce_Payments_Server"
JspBatchCompiler -enterpriseapp.name " payment_instance_Commerce_Payments_App" -compileToWebInf false -cell.name " cellname" -node.name " nodename" -server.name " instance_Commerce_Payments_Server" -profileName "WAS_instance"I5/OS:
If a default WAS instance is used, the -cell.name and -node.name parameters are set to the i5/OS hostname, by default. If a non-default WAS instance is used, the -cell.name and -node.name parameters are set to the hostname_WAS_instance by default.
JspBatchCompiler.bat -enterpriseapp.name " payment_instance_Commerce_Payments_App" -compileToWebInf false -cell.name " cellname" -node.name " nodename" -server.name " instance_Commerce_Payments_Server"
Where:
- payment_instance
- is the name of the WebSphere Commerce payments instance for which you are compiling the JSP files. The name of the default WebSphere Commerce Payments instance is wpm.
- cellname
- is the name of your cell. The default value is WPM_ payments_instance_cell.
- nodename
- is the name of your node that runs WebSphere Commerce. The default value is WPM_ payment_instance_node.
Several errors are logged when you perform these compilation jobs. You can safely ignore these errors.
Related Concepts
Store publish process
Related tasks
Publishing a store archive
Deploying custom J2EE assets