Network Deployment (Distributed operating systems), v8.0 > Administer applications and their environment > Administer web applications > Administer web applications
Configure JSP engine parameters
Learn about how to add, change or delete JSP engine configuration parameters.
The following note applies to the file references with a .xmi extension in this topic:
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:
- For an application or module that uses a Java EE version prior to version 5, the file extension must be .xmi.
- For an application or module that uses Java EE 5 or later, the file extension must be .xml. If .xmi files are included with the application or module, the product ignores the .xmi files.
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. WAS does not support the modification of deployment descriptor extension parameters through the Administrative Console or through administrative scripting.
Use an assembly tool, such as Rational Application Developer, to modify IBM extension and binding files. We 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...
Procedure
- Open the WEB-INF/ibm-web-ext.xmi or WEB-INF/ibm-web-ext.xml file.
JSP engine configuration parameters are stored in a web module's configuration directory or in a web modules's binaries directory in the WEB-INF/ibm-web-ext.xmi or WEB-INF/ibm-web-ext.xml file. Open the WEB-INF/ibm-web-ext.xmi or WEB-INF/ibm-web-ext.xml file from:
- The configuration directory, as in the following example:
{WAS_ROOT}/profiles/profilename/config/cells/cellname/applications/enterpriseappname/deployments/deployedname/webmodulename- The binaries directory if an application was deployed into WAS with the flag "Use Binary Configuration" set to true. An example of a binaries directory is:
{WAS_ROOT}/profiles/profilename/installedApps/nodename/EnterpriseAppName/WebModuleName/
- Edit the WEB-INF/ibm-web-ext.xmi or WEB-INF/ibm-web-ext.xml file.
- To add configuration parameters to the WEB-INF/ibm-web-ext.xmi file, use the following format:
xmi:id="JSPAttribute_6" name="parametername" value="parametervalue"/>
- To add configuration parameters to the WEB-INF/ibm-web-ext.xml file, use the following format:
<jsp-attribute name="parametername" value="parametervalue"/>
- To delete configuration parameters, either delete the line from the file, or enclose the statement with <!-- --> tags.
- Save the file.
- Restart the Enterprise Application. It is not necessary to restart the server for parameter changes to take effect. However, some JSP engine configuration parameters affect the Java source code that is generated for a JSP. If such a parameter is changed, then retranslate the JSP files in the web module to regenerate Java source. We can use the batch compiler to retranslate all JSP files in a web module. The batch compiler uses the JSP engine configuration parameters that we have set in the ibm-web-ext.xmi or ibm-web-ext.xml file, unless you specifically override them. The topic, JSP engine configuration parameters, identifies the parameters that affect the generated Java source.
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="http://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="http://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="true"/> </web-ext>Attention: The integer n in JSPattribute_n has to be unique within the file.
Related
JSP engine
JSP engine configuration parameters
JSP troubleshooting tips
JSP
Global tag libraries (deprecated)
Related
dbmodify tag JSP syntax (deprecated)
JSPBatchCompiler command
Web applications: Resources for learning