JavaServer Pages specific web container custom properties
You can configure name-value pairs of data, where the name is a property key and the value is a string value that you can use to set internal system configuration properties. You can define a new property to configure a setting beyond what is available in the administrative console.
- com.ibm.ws.jsp.getparameterreturnemptystring
- com.ibm.ws.jsp.jdksourcelevel
- com.ibm.ws.jstl.allowLenientDateParsing
- com.ibm.wsspi.jsp.allowjspoutputelementmismatch
- com.ibm.wsspi.jsp.allowtaglibprefixusebeforedefinition
- com.ibm.wsspi.jsp.allowtaglibprefixredefinition
- com.ibm.wsspi.jsp.allowunmatchedendtag
- com.ibm.wsspi.jsp.evalquotedandescapedexpression
- com.ibm.wsspi.jsp.modifyPageContextVariable
- com.ibm.wsspi.jsp.recompilejsponrestart
- com.ibm.wsspi.jsp.usecdatatrim
- com.ibm.wsspi.jsp.usescriptvardupinit
- com.ibm.wsspi.jsp.usestringcast
- com.ibm.wsspi.jsp.reusepropertygroupconfigoninclude
com.ibm.ws.jsp.getparameterreturnemptystring
Use this custom property to facilitate the migration of Version 5.1 applications.
If a JSP file contains an action that is not set in a JSP file, the JSP engine returns null. In Version 5.1, if a JSP file contains an action that is not set in a JSP file, the JSP engine returned an empty string. If you need your applications to continue returning an empty string, add this property to your JSP settings and set it to true. When this property is set to true, the value returned on a call to jsp:getProperty is an empty string instead of null.
- Name
- com.ibm.ws.jsp.getparameterreturnemptystring
- Value
- Boolean
com.ibm.ws.jsp.jdksourcelevel
Use this property to set the JDK source level through the administrative console.
A JSP engine parameter can be configured for different levels of JDK. However, setting a JSP parameter requires that you set the jdksourcelevel JSP attribute in the web extension file for each web module. However, you can use the com.ibm.ws.jsp.jdksourcelevel custom property to set the JSP attribute globally using the web container custom property. If this attribute is also defined in the web extension file, the property defined in the web extension file supersedes the custom property for that particular application. This custom property is not case-sensitive.
The default value is 17.
- Name
- com.ibm.ws.jsp.jdksourcelevel
- Value
- 13, 14, 15, 16, 17, or 18
com.ibm.wsspi.jsp.allowjspoutputelementmismatch
CTS requirements in previous releases were not applicable to the product, therefore the JSP container supported multiple occurrences of properties in the jsp:output element. In the current release, CTS compliance requires that the JSP container strictly enforces rules about multiple occurrences of properties in the jsp:output element. You can use the com.ibm.wsspi.jsp.allowjspoutputelementmismatch custom property to relax the enforcement of the rule for compatibility with earlier versions.
- Name
- com.ibm.wsspi.jsp.allowjspoutputelementmismatch
- Value
- Boolean
com.ibm.ws.jstl.allowLenientDateParsing
<fmt:parseDate value="20070311 02:00:00 AM"
var="myTestDate"
type="date"
pattern="yyyyMMdd HH:mm:ss a" />
java.text.ParseException: Unparseable date: "20070311 02:00:00 AM"
at java.text.DateFormat.parse(DateFormat.java:349) at
org.apache.taglibs.standard.tag.common.fmt.ParseDateSupport.doEn dTag(ParseDateSupport.java:178)
at com.ibm._jsp._testDate._jspx_meth_fmt_parseDate_0(_jstlDate.java :123)
at com.ibm._jsp._testDate._jspService(_jstlDate.java:86) ... 28 more
If you want to allow more lenient parsing of the date when using the parseDate tag in a specific application, add the com.ibm.ws.jstl.allowLenientDateParsing property as a context parameter to the web.xml file for that application and set this parameter to true.
Following is an example of how to specify this property as a context parameter in a web.xml file:
<context-param>
<param-name>com.ibm.ws.jstl.allowLenientDateParsing</param-name>
<param-value>true</param-value>
</context-param>
com.ibm.wsspi.jsp.allowtaglibprefixusebeforedefinition
CTS compliance requires that a tag library directive that defines a prefix must occur before that prefix is used in a custom tag. This rule was not enforced in previous releases because CTS requirements were not required. However, you can use the com.ibm.wsspi.jsp.allowtaglibprefixusebeforedefinition custom property to relax the enforcement of the rule for compatibility with earlier versions.
- Name
- com.ibm.wsspi.jsp.allowtaglibprefixusebeforedefinition
- Value
- Boolean
com.ibm.wsspi.jsp.allowtaglibprefixredefinition
CTS compliance requires that if a tag library prefix is already defined with a different URI within a JSP, the product must create a translation error. This rule was not enforced in previous releases because CTS requirements were not required. However, you can use the com.ibm.wsspi.jsp.allowtaglibprefixredefinition custom property to relax the enforcement of the rule for compatibility with earlier versions.
- Name
- com.ibm.wsspi.jsp.allowtaglibprefixredefinition
- Value
- Boolean
com.ibm.wsspi.jsp.allowunmatchedendtag
Use this custom property to facilitate the migration of Version 5.1 applications.
When an improper termination of end tags occurs, a translation exception is created. In Version 5.1 of the product, improper termination of end tags was ignored. If you are migrating applications from Version 5.1 that have improperly terminated end tags, you can add this custom property to your web container settings, and set it to true if you want do not want a translation exception to be issued when an improper termination of end tags occurs.
When this property is set to true, this functionality is enabled for all applications in the server. If you want to enable this functionality for a specific application, specify the JSPAttribute allowUnmatchedEndTag, in the extensions file for that specific application.
- Name
- com.ibm.wsspi.jsp.allowunmatchedendtag
- Value
- Boolean
com.ibm.wsspi.jsp.evalquotedandescapedexpression
Use this property to compile functions that contain an expression. The JSP translation code was modified to handle escape characters and quotations properly when determining whether to evaluate an expression or to treat it as a literal string. To apply this behavior globally across all web applications, add the following name-value pair as a web container custom property.
- Name
- com.ibm.wsspi.jsp.evalquotedandescapedexpression
- Value
- Boolean
To enable this new behavior for a single application, you must also add the evalquotedandescapedexpression JSP attribute to the ibm-web-ext.xmi or ibm-web-ext.xml file of the failing application and set the value to true.
<jspAttributes xmi:id="JSPAttribute_1" name="evalquotedandescapedexpression" value="true"/>
<?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">
<jsp-attribute name="evalquotedandescapedexpression" value="true" />
<reload-interval value="3"/>
<auto-encode-requests value="true"/>
<auto-encode-responses value="true"/>
<enable-directory-browsing value="true"/>
<enable-file-serving value="true"/>
<pre-compile-jsps value="true"/>
<enable-reloading value="true"/>
<enable-serving-servlets-by-class-name value="true" />
</web-ext>
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.
com.ibm.wsspi.jsp.modifyPageContextVariable
During the translation phase of a tag file that is compiled, the JSP container implicitly uses the pageContext variable for the PageContext object. The use of the pageContext variable as an implicit variable name in tag files does not comply with the JSP Specification.
If compilation errors occur for applications that use a local pageContext variable in their tag file, set the com.ibm.wsspi.jsp.modifyPageContextVariable custom property to true to remove the use of the pageContext variable name in the generated Java code for tag files.
- Name
- com.ibm.wsspi.jsp.modifyPageContextVariable
- Value
- Boolean
com.ibm.wsspi.jsp.recompilejsponrestart
This property forces JSP files that were compiled at run time to be recompiled every time the application is restarted. This property is helpful if you switch the underlying JSF implementation. This property is best used on development environments.
- Name
- com.ibm.wsspi.jsp.recompilejsponrestart
- Value
- Boolean
com.ibm.wsspi.jsp.usecdatatrim
Use this custom property to facilitate the migration of Version 5.1 applications.
If your JSP files include nesting tags on separate lines, extra lines appear in the Java code that is generated for those sections of the JSP files. The extra lines are added in the generated Java code because the text is not trimmed before creating the CDATA section.
You can eliminate the extra lines if you use the double quotation mark (") to append all the lines into a single line, or if you use this property to enable the trimming of the text before the CDATA section is created. Trimming the text before the CDATA section is created eliminates the extra spaces in the generated Java code.
When this property is added to your web container settings, and set to true, this functionality is enabled for all applications in the server. If you want to enable this functionality for a specific application, specify the JSPAttribute, useCDataTrim, for that specific in the extensions file for that specific application.
- Name
- com.ibm.wsspi.jsp.usecdatatrim
- Value
- Boolean
com.ibm.wsspi.jsp.usescriptvardupinit
The code generated for a JSP file assumed that the same tag variables to be declared two or more times in an If-Else condition, even if the variable had a page scope. The com.ibm.wsspi.jsp.usescriptvardupinit custom property enables this feature for all the applications deployed on a particular server. If the compatibility feature is required only for a specific application, enable the useScriptVarDupInit JSP attribute. If both the options are set, then the JSP attribute takes preference over the web container custom property.
- Name
- com.ibm.wsspi.jsp.usescriptvardupinit
- Value
- Boolean
com.ibm.wsspi.jsp.reusepropertygroupconfigoninclude
- Name
- com.ibm.wsspi.jsp.reusepropertygroupconfigoninclude
- Value
- false
com.ibm.wsspi.jsp.usestringcast
Use this custom property to facilitate the migration of Version 5.1 applications.
The generated Java source for a JSP file does not add the "implicit" cast for return types of type String when the request.getAttribute method is called. When a JSP file includes a resource whose relative path does not evaluate to a String, the include fails because the include takes only a String as a relative path of the resource. This behavior is different than the behavior in Version 5.1.
If you are migrating Version 5.1 applications that include the request.getAttribute method, you can add this property to your web container settings and set it to true. When this property is set to true the JSP compiler explicitly adds a 'String cast' to the relative path of a resource before the inclusion.
When this property is added to your web container settings, and set to true, this functionality is enabled for all applications in the server. If you want to enable this functionality, specify the useStringCast JSPAtrribute in the extensions file for the specific application.
- Name
- com.ibm.wsspi.jsp.usestringcast
- Value
- Boolean