When users call a JSP page the first time, WebSphere® automatically compiles that JSP. JSP compilations, however, can take a long time, which could lead to the perception that the system is slow. Some JSPs can take over a minute to compile. You can avoid this problem by precompiling the JSPs before or after deployment.
To do this, use the JspBatchCompiler script from your WebSphere install's ${WAS_ROOT}/bin.
For precompiling prior to deployment, use:
./JspBatchCompiler.sh -ear.path <ear location>/<EAR name> -forceCompilation true
The precompiled EAR is created in the TMPDIR location, which is set to /tmp in UNIX, by default. To change the location, add export TMPDIR=<path_to_new_temp> to the precompilation command, where <path_to_new_temp> is the path of the new location.
You can then deploy this precompiled EAR as usual through the WebSphere Administration console. It is possible that WebSphere may need more memory when deploying this EAR. The advantage in precompiling before deployment is that you will not have to precompile on every single node after deployment.
For precompiling after deployment, use:
./JspBatchCompiler.sh \
-enterpriseapp.name ${appName} \
-cell.name <customer cell name> \
-node.name <customer node name> \
-server.name <customer server name> \
-profileName <profile name> \
-keepgenerated true
For additional information about how to use the JspBatchCompiler, use the -help option to the command or refer to WebSphere's Infocenter documentation.