uCosminexus Application Server, Web Container Functionality Guide
This subsection describes the precautions for using the specifications that were added and changed in JSP 2.0 on the application server. For details on the JSP 2.0 specifications and JSP 1.2 specifications, see the respective specifications (JSP 2.0 specifications and JSP 1.2 specifications).
In the JSP 2.0 specifications, the standard extension of JSP documents is jspx. In the Web Container used on the application server, a file with extension jspx is handled as a JSP document even if URL mapping is not defined in web.xml using default mapping.
Like a JSP file, Java source files and class files are generated by JSP compilation for a tag file. The Java source files and class files are output in the directory to output the JSP compilation result.
You can change the directory to output the JSP compilation result. Note that you must change the output destination directory when the path of the generated Java source files and class files exceeds the upper limit for the OS.
For details on the directory to output the JSP compilation result, see 2.5.5(2) Output destination of JSP compilation results when the JSP pre-compilation functionality is used and see 2.5.6(3) Output destination of JSP compilation results when the JSP pre-compilation functionality is not used.
In the JSP 2.0 specifications, the following API functions are provided as the API functions for performing the syntax analysis and evaluating the EL expression:
In the JSP 2.0 specifications, you cannot specify multiple EL expressions from these API functions, but in the application server, you can specify multiple EL expressions.
<?xml version="1.0" ?> <jsp:root xmlns:jsp=http://java.sun.com/JSP/Page version="2.0"> <jsp:directive.page import="java.util.* "/> <jsp:useBean id="name" class="test.Bean"/> </jsp:root> |
The isThreadSafe attribute of the page directive is deprecated in the JSP 2.0 specifications since the javax.servlet.SingleThreadModel interface is deprecated.
In the application server, you can use the isThreadSafe attribute of the page directive regardless of the Web application version. However, in the Servlet 2.4 specifications, note the cause due to which the javax.servlet.SingleThreadModel interface is deprecated, and then use.
In JSP 2.0 specifications, a postscript has been added that the when the JSP document is used, the value of the default ContentType is text/xml.
In the application server, text/xml is operated as the default value in JSP 2.0 and later versions and text/html is operated as the default value in JSP 1.2.
In the JSP 2.0 specifications, the provisions regarding the deployment location of the tag library descriptor is added.
In the application server, the KDJE39289-W message may be output when the Web application starts and during JSP compilation depending on the directory deployed. However, the Web application is executed without an error.
The message output conditions are described below:
The specifications of the XML view information that can be acquired with the getInputStream method of the javax.servlet.jsp.tagext.PageData object were changed in the JSP 2.0 specifications. The getInputStream method is specified and used in the third argument of the validate method of the javax.servlet.jsp.tagext.TagLibraryValidator class.
The changes in the application server are described as follows for the JSP 2.0 and later versions and JSP 1.2:
In the JSP 2.0 specifications, a postscript has been added that the pageEncoding attribute of the page directive is only applied to the file that describes the pageEncoding attribute.
In the application server, regardless of the Web application version, if the character code is not specified in the include destination file while including the file in the include directive, the character code at the include source is applied to the include destination file.
The specifications when the character code specified for the XML declaration in the JSP document differs from the character code specified in the pageEncoding attribute of the page directive in the JSP document, have been added in the JSP 2.0 specifications. This description is not present in the JSP 1.2 specifications.
The control when the character codes in the application server are different will be separately described for JSP 2.0 and later versions and JSP 1.2.
The default character code of HTTP response used when the contentType attribute of the page directive does not exist in the JSP document and when the CHARSET value does not exist in the attribute has been added in the JSP 2.0 specifications.
The default value in the application server will be separately described for JSP 2.0 and later versions and JSP 1.2.
The specifications for multiple pageEncoding attributes of the page directive are changed in the JSP 2.0 specifications.
In JSP 2.0 specifications, multiple pageEncoding attributes can be specified for each translation (files included in the JSP and include directive). A specification was also added that if multiple pageEncoding attributes are specified in the same JSP file, a compilation error occurs.
In the application server, regardless of the Web application version, you can specify multiple pageEncoding attributes in each translation. In this case, the value specified in each file is applied to the applicable file. Also, the specification of multiple pageEncoding attributes in the same JSP file differs in the JSP 2.0 and later versions and in JSP 1.2. The specifications in the application server will be described separately for JSP 2.0 and later versions and for JSP 1.2.
Specifications were added in the JSP 2.0 specifications for the operations when the tag library is declared in the JSP document using the name space and the specified uri is not found in the taglib map (mapping of the uri and tag library descriptor).
The operations in the application server will be described separately for JSP 2.0 and later versions and JSP 1.2.
The method for determining the file character code in the JSP document was changed in the JSP 2.0 specifications.
The method for determining the character code in the application server will be described separately for JSP 2.0 and later versions and JSP 1.2.
The JSP specifications and the specifications for the Web Container used in the application server are described below for the JSP 2.0 specification of escape sequence that expresses "$" included in "${", indicating the start of EL, as a string.
In the Web Container used on the application server, "\$" is output as "$" using the escape sequence. If you want to output "\$", code as "\\$".
The operations when "\$" is coded will be described separately for JSP 2.0 and JSP 1.2.
Table 6-36 Output results of "\$" when the operations are performed in JSP 2.0
Enabling/ Disabling of EL settings | Specifications | Output results |
---|---|---|
Enabled | JSP 2.0 specifications | "$" |
Web Container used in the application server | "$" | |
Disabled | JSP 2.0 specifications | "\$" |
Web Container used in the application server | "$" |
Table 6-37 Output result of "\$" when operations are performed in JSP 1.2
Specifications | Output results |
---|---|
JSP 1.2 specifications | "\$" |
Web Container used in the application server | "$" |
The JSP specifications and application server specifications for the type of EL evaluation results specified in the custom tag attribute are described below.
The examples when the types of EL evaluation results differ in the JSP specifications and the application server are described below.
In this example, the type of EL evaluation result is as follows:
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.