Configuring JSP engine parameters
Learn about how to add, change or delete JSP engine configuration parameters.
About this task
The following note applies to the file references with a .xmi extension in this topic:
WebSphere®
Application Server does not support the modification of deployment descriptor extension parameters
through the Administrative Console or through administrative scripting. Supported configurations: For IBM®
extension and binding files, the .xmi or .xml file name
extension is different depending on whether you are using a pre-Java EE 5 application or module or a
Java™ EE 5 or later application or module. An IBM extension or binding file is named ibm-*-ext.xmi or
ibm-*-bnd.xmi where * is the type of extension or binding file such as
app, application, ejb-jar, or
web. The following conditions apply:
However, a Java EE 5 or later module can exist within an application that includes pre-Java EE 5 files and uses the .xmi file name extension.
The ibm-webservices-ext.xmi, ibm-webservices-bnd.xmi, ibm-webservicesclient-bnd.xmi, ibm-webservicesclient-ext.xmi, and ibm-portlet-ext.xmi files continue to use the .xmi file extensions.
Best practice: Use an assembly tool, such as Rational Application Developer,
to modify IBM extension and binding files. You can convert extension and binding files within
modules from XMI to XML using the IBM Bindings and Extensions Conversion Tool for
Multi-Platforms.
To add, change or delete JSP engine configuration parameters, complete the following steps:
Procedure
Example
The following is a sample of the WEB-INF/ibm-web-ext.xmi file. The lines in
bold text are JSP engine configuration
parameters.
<?xml version="1.0" encoding="UTF-8"?>
<webappext:WebAppExtension xmi:version="2.0" xmlns:xmi=https://www.omg.org/XMI
xmlns:webappext="webappext.xmi" xmlns:webapplication="webapplication.xmi" xmi:id="WebAppExtension_1"
reloadInterval="9" reloadingEnabled="true" defaultErrorPage="error.jsp" additionalClassPath=""
fileServingEnabled="true" directoryBrowsingEnabled="false" serveServletsByClassnameEnabled="true"
autoRequestEncoding="true" autoResponseEncoding="false">
<webApp href="WEB-INF/web.xml#WebApp_1"/>
<jspAttributes xmi:id="JSPAttribute_1" name="useThreadTagPool" value="true"/>
<jspAttributes xmi:id="JSPAttribute_2" name="verbose" value="false"/>
<jspAttributes xmi:id="JSPAttribute_3" name="deprecation" value="false"/>
<jspAttributes xmi:id="JSPAttribute_4" name="reloadEnabled" value="true"/>
<jspAttributes xmi:id="JSPAttribute_5" name="reloadInterval" value="5"/>
<jspAttributes xmi:id="JSPAttribute_6" name="keepgenerated" value="true"/>
<!--<jspAttributes xmi:id="JSPAttribute_7" name="trackDependencies" value="true"/> -->
</webappext:WebAppExtension>
The following is a sample of the
WEB-INF/ibm-web-ext.xml
file. The lines in bold
text are JSP engine configuration
parameters.<?xml version="1.0" encoding="UTF-8"?>
<web-ext
xmlns="http://websphere.ibm.com/xml/ns/javaee"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
version="1.0">
<default-error-page uri="error.jsp"/>
<jsp-attribute name="useThreadTagPool" value="true" />
<jsp-attribute name="verbose" value="false" />
<jsp-attribute name="deprecation" value="false" />
<jsp-attribute name="reloadEnabled" value="true" />
<jsp-attribute name="reloadInterval" value="5" />
<jsp-attribute name="keepgenerated" value="true" />
<jsp-attribute name="trackDependencies" value="true" />
<reload-interval value="9"/>
<auto-encode-requests value="true"/>
<auto-encode-responses value="false"/>
<enable-directory-browsing value="false"/>
<enable-file-serving value="false"/>
<pre-compile-jsps value="false"/>
<enable-reloading value="true"/>
<enable-serving-servlets-by-class-name value="true"/>
</web-ext>
Attention: The integer n in JSPattribute_n has
to be unique within the file.