49 lines
4.4 KiB
HTML
49 lines
4.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
|
|
|
|
<title>Pre-touch tool for compiling and loading JSP files</title>
|
|
</head>
|
|
|
|
<BODY>
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
<h4><a name="jspprtch"></a>Pre-touch tool for compiling and loading JSP files</h4>
|
|
|
|
<p>When enabled, the pre-touch mechanism causes all JSPs to be compiled within the Web module for which they are configured. You can also configure some or all JSPs to be classloaded and JIT-compiled.</p>
|
|
|
|
<p>You have to manually add the JSP attributes to the ibm-web-ext.xmi file in the Web module of your application. Use WebSphere Development Studio Client for iSeries to import your application and configure JSP attributes. (WebSphere Application Server - Express for iSeries ships with WebSphere Development Studio Client for iSeries.) For example:</p>
|
|
|
|
<pre>
|
|
<jspAttributes xmi:id="JSPAttribute_1" name="prepareJSPs" value="0"/>
|
|
<jspAttributes xmi:id="JSPAttribute_2" name="prepareJSPAttribute" value="1"/>
|
|
</pre>
|
|
|
|
<p>Export the modified application out of WebSphere Development Studio Client for iSeries as an enterprise archive (EAR) file, and install the EAR file into WebSphere Application Server - Express.</p>
|
|
|
|
<p>To enable the pre-touch mechanism, specify the following JSP attributes, which are Assembly Property Extensions for your Web module:</p>
|
|
|
|
<ul>
|
|
<li><p><strong>prepareJSPs</strong> (Required)
|
|
<br>When this attribute is present, all JSPs are compiled at application server startup. This activity runs in a separate thread, allowing the application server to finish other startup actions in parallel. The numeric attribute value represents the minimum size (in kilobytes) that a JSP must be in order to also be classloaded and JIT-compiled. The default is 0, which causes all JSPs to be classloaded and JIT-compiled.</p>
|
|
|
|
<p><strong>Note:</strong> JSP compilation is different from JIT compilation. JSP compilation generates bytecodes, whereas JIT translates the bytecodes into machine code at run time.</p></li>
|
|
|
|
<li><p><strong>prepareJSPAttribute</strong> (Optional)
|
|
<br>The pre-touch mechanism compiles and JIT-compiles JSPs by directly invoking the JSP service method, thus making the JSP susceptible to incurring exceptions because it is being called out of context. Such exceptions are avoided by immediately checking the value of this attribute, causing a quick exit from the service method when the JSP was prepared by this tool. This attribute value is added as a request parameter and is composed of alphanumeric characters that your JSPs do not expect to use during normal execution.</p></li>
|
|
|
|
<li><p><strong>prepareJSPThreadCount</strong> (Optional)
|
|
<br>Set this numeric attribute to the number of threads that you would like this mechanism to start up to compile your JSPs. Since a thread makes use of just one processor, multi-processor systems may better utilize this pre-touch mechanism by specifying a value greater than 1. The default setting for this attribute is 1, representing the number of threads that are created to perform pre-touch processing for this Web module.</p></li>
|
|
|
|
<li><p><strong>prepareJSPClassload</strong> (Optional)
|
|
<br>Set this attribute to either a whole number or the word changed. By entering changed, only those JSPs that have been updated or not previously touched (for example, those JSPs that need to be converted from .jsp to .java) are classloaded. By entering a numerical value (for example, 1000), the pretouch tool starts classloading at the 1000th JSP that it processes and all subsequent JSPs. This is convenient in the event that the application server is stopped during pretouch execution. A customer can then check the server logs to see how many JSPs were already processed, and update the prepareJSPClassload value accordingly to avoid duplicating work. If a JSP is not classloaded, it cannot be JIT compiled. As a result, if a JSP does not satisfy the requirements of the prepareJSPClassload attribute, but satisfies the requirements of prepareJSPs, the JSP is compiled (if it has been updated), but is not classloaded or JIT compiled.</p></li>
|
|
|
|
</ul>
|
|
|
|
</body>
|
|
</html>
|
|
|