Network Deployment (Distributed operating systems), v8.0 > Reference > Custom properties


JSP specific web container custom properties

We 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. We can define a new property to configure a setting beyond what is available in the admin console. This topic includes a list of the available JSP custom properties. The JSP custom properties are case-sensitive.

We can use the following JSP file-specific web container custom properties:


Modify the default web container configuration


Related


JSP engine configuration parameters
Web container custom properties
IBM Bindings and Extensions Conversion Tool for Multi-Platforms.


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 v5.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 the 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 16.

Name

com.ibm.ws.jsp.jdksourcelevel

Value

13, 14, 15, or 16


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. We 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

Some applications include the JSTL fmt:parseDate tag to parse a date and time. For example:

<fmt:parseDate value="20070311 02:00:00 AM"
var="myTestDate"
type="date"
pattern="yyyyMMdd HH:mm:ss a" />

If the date and time being parsed falls within daylight savings hours, the following exception occurs:

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

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> 
Because this property must be set for a specific application, it must be specified as a context parameter. This property is ignored if it is specified as a custom property.


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 v5.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. 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, 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.

The following example code shows the attribute in an XMI format:

&ltjspAttributes xmi:id="JSPAttribute_1" name="evalquotedandescapedexpression" value="true"/> 
The attribute ID value must be unique.

The following example code shows the attribute in the ibm-web-ext.xml file:

<?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="true" />


</web-ext> 

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.

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.


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.

We 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 white 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. 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

For transitioning users: Most properties that are defined in a JSP property group apply to an entire translation unit, for example, the requested JSP file that is matched by its URL pattern and all the files it includes using the include directive. The exceptions are the page-encoding and is-xml properties, which apply separately to each JSP file that is matched by its URL pattern.

To revert the behavior to a setting before WAS v8.0, set the custom property to true to apply the two property values to the entire translation unit.trns

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 v5.1.

If you are migrating v5.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. To enable this functionality for a specific application, specify the JSPAttribute, useStringCast, in the extensions file for that specific application.

Name

com.ibm.wsspi.jsp.usestringcast

Value

Boolean

+

Search Tips   |   Advanced Search