WebLogic tuning: JSP pre-compilation
Some JSP pages compile automatically, but you can pre-compile by following a set of tasks.
When users call up a JSP page the first time, WebLogic automatically translates the JSP file into a servlet and then compiles that servlet. This process can take over 30 seconds, which could lead to user dissatisfaction. Further, this process is performed serially even on a multiprocessor node - if you have multiple users hitting five different pages, WebLogic compiles these pages one at a time. As a result, we strongly recommend precompiling the JSP pages prior to deployment into production.
To precompile, you need to build the Sterling™ Order Management System Software enterprise archive file (smcfs.ear).
Follow these steps:
- Export
JAVA_HOME=<java installation directory>
, where<java installation directory>
is the path to the java installation directory. For example,JAVA_HOME=/apps/jdk/java1.8/
. - Export
INSTALL_DIR=<ssfs installation directory>
, where<ssfs installation directory>
is the path to the Sterling Order Management System Software installation directory. For example,INSTALL_DIR=/apps/V10/foundation
. - Export
WL_HOME=<weblogic server directory>
, where<weblogic server directory>
is the WebLogic server directory. For example,WL_HOME=/apps/wls12213/wlserver/server
. - For WebLogic 12.2.1.3, export:
WLS_JARS=${JAVA_HOME}/lib/tools.jar:${WL_HOME}/lib/weblogic.jar:${WL_HOME}/lib/ojdbc8.jar:${JAVA_HOME}/jre/lib/rt.jar
- Export
STERLING_CLASSPATH="${WLS_JARS}:${CLASSPATH}"
. - Export
APPC_CLASSPATH=${WL_HOME}/lib/weblogic.jar:${JAVA_HOME}/lib/tools.jar
. - Run the following
command:
${JAVA_HOME}/bin/java -Xms1024m -Xmx1024m -Djava.io.tmpdir=${INSTALL_DIR}/tmp -classpath
${APPC_CLASSPATH} weblogic.appc ${INSTALL_DIR}/external_deployments/smcfs.ear -forceGeneration -O -verbose -classpath ${YANTRA_CLASSPATH} ${INSTALL_DIR}/external_deployments/smcfs.ear
The precompiled JSPs are stored back into the smcfs.ear
file.