bea.com | products | dev2dev | support | askBEA |
![]() |
![]() |
|
![]() |
e-docs > WebLogic Platform > WebLogic Portal > JavaServer Page Guide > Tuning JSP Performance |
JavaServer Page Guide
|
Tuning JSP Performance
When a customer requests a page on your e-business Web site, WebLogic Portal compiles the corresponding JSP into a servlet. In addition to servlets that come from compiled JSPs, WebLogic Portal provides a set of servlets for exchanging information between various components of the system.
This section provides information on tuning JSP compiling and updating. It includes information in the following subjects:
Step 1: Precompile JSPs
For each of your Web applications that you deploy, you can determine when WebLogic Portal compiles JSPs:
The sample applications for WebLogic Portal samples are precompiled on installation.
Use the following steps. For more information, see the WebLogic Server XML elements documentation at http://download.oracle.com/docs/cd/E13222_01/wls/docs70/webapp/weblogic_xml.html, and the WebLogic Server Administration Guide at http://download.oracle.com/docs/cd/E13222_01/wls/docs70/adminguide/overview.html#1036999.
Step 2: Specify a Java Compiler for a Web Application
The WebLogic Server Administration Console specifies a Java compiler for each server configuration. All applications that you deploy on a server use this compiler unless a Web application's weblogic.xml file specifies a different compiler.
To review the current Java compiler for your server, in the left pane of the WebLogic Server Administration Console, click a server. In the right pane, on the Configurations tab, click the Compilers subtab. To enter a new name, enter the pathname of the Java compiler that you want to use for the Web application. To deploy any modifications, restart the server.
For more information, see the WebLogic Server XML elements documentation at http://download.oracle.com/docs/cd/E13222_01/wls/docs70/webapp/weblogic_xml.html, and the WebLogic Server Administration Guide at http://download.oracle.com/docs/cd/E13222_01/wls/docs70/adminguide/overview.html#1036999.
Step 3: Adjust the Intervals for Checking JSP and Servlet Modifications
You can specify how frequently a server checks for modifications to JSPs and source files for other servlets in a Web application.
The sample Web applications check for modified JSPs each time a Web browser requests a JSP. Likewise, each time the server sends a request to a servlet in a sample Web application, it checks for any modifications to the servlet class files.
For your production Web site, you can decrease the amount of time in which WebLogic Portal serves JSPs and processes requests to servlets by increasing the intervals at which the server checks for modifications.
Although the server performs faster with higher values for the modification-check intervals, the higher values reduce sensitivity to changes in your source files. For example, you can set the server to check for JSP modifications every 10 minutes. After you change a JSP, it will take up to 10 minutes for the server to see the modifications.
This section includes information on the following subjects:
Understand the Page-Check Intervals Properties
The pageCheckSeconds attribute determines the interval at which a server checks to see if JSP files in a Web application have changed and need recompiling. Each Web application defines this property separately in its WEB-INF\weblogic.xml file:
<jsp-param>
<param-name>pageCheckSeconds</param-name>
<param-value>1</param-value>
</jsp-param>
The page-check interval does not determine the frequency with which a server checks for updated content that is stored in the database and in a content management system. Instead, the TTL (time-to-live) settings for various caches determine the refresh rate for content. For example, if you set the page-check intervals to once a second, and you set the TTL for the content cache to 10 minutes, it can take up to 10 minutes for the server to see the new content, even though it is checking for new JSP source code every second. For information on setting TTL properties, see "Performance Tuning" in the Development Guide at http://download.oracle.com/docs/cd/E13218_01/wlp/docs70/dev/x10ding.htm#1040480
Adjust the Intervals
To determine the optimal page-check and reload-servlet intervals for your production Web site do the following:
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |