uCosminexus Application Server, Web Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

6.3.2 Precautions related to the class attributes of <jsp:useBean> tag

This subsection describes the precautions related to the class attributes of the <jsp:useBean> tag, differences in JSP compilation operations depending on the usage of the JSP translation backward compatibility function, and the definition of the JSP translation backward compatibility function.

Organization of this subsection
(1) Notes
(2) Differences in JSP compilation operations depending on the usage of the JSP translation backward compatibility function
(3) Defining the JSP translation backward compatibility function

(1) Notes

In the <jsp:useBean> tag, JSP specifications define that class attribute is the implementation class name of the object. Complying with these specifications, the following checks are implemented during the JSP translation for the classes specified in the class attribute, with the version 07-00 and later versions:

Therefore, when a class that does not meet these check items is specified in the class attribute, the JSP compilation results are different with the versions prior to 07-00 and with version 07-00 and later versions.

The following is an example of JSP wherein the implementation class is specified in the include source and an interface is specified in the include destination:

Note:
test.TestBean specified in the class attribute is an implementation class compliant with the JSP specifications and test.TestBeanIF becomes the interface of test.TestBean.

The operations for each Application Server version in this example are as follows:

(2) Differences in JSP compilation operations depending on the usage of the JSP translation backward compatibility function

The differences in the compilation operations when the JSP translation backward compatibility function is used and when the function is not used with version 07-00 and later versions are as follows:

When a class name that cannot be instantiated is specified in the class attribute
  • Use the JSP translation backward compatibility function
    Bean can be acquired without the id attribute value specified in the <jsp:useBean> tag from the second time onwards without resulting in an error.
  • Do not use the JSP translation backward compatibility function
    An error occurs during JSP translation.

(3) Defining the JSP translation backward compatibility function

To define the JSP translation backward compatibility function, specify the following parameter in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file:

webserver.jsp.translation.backcompat.taglib.noCheckPrefix
Specifies whether or not to check the class property value of the <jsp:useBean> tag during JSP translation.

For details on the Easy Setup definition file and the parameters to be specified, see the uCosminexus Application Server Definition Reference Guide.