uCosminexus Application Server, Web Container Functionality Guide
2.3.5 Checking the attribute name of the custom tag
When you check the attribute name of the custom tag, if the upper case and the lower case of the following attribute names do not match, a translation error occurs.
- Attribute names specified in the JSP custom tag
- Attribute names defined in the TLD file or tag file
With Application Server, you can control the occurrence of translation errors because of mismatch in the upper case and the lower case, when checking the attribute name of the custom tag. If you control the occurrence of such translation errors, the definition of the custom tag attribute is searched without case-sensitivity from the attribute names defined in the TLD file or tag file.
The locations for defining the attribute names of the TLD file and tag file are as follows:
- The attribute name defined in the <name> element exists in the <taglib><tag><attribute> element of the TLD file
- The attribute name defined in the attribute directive of the tag file
- Organization of this subsection
- (1) How to disable the attribute name check of the custom tag
- (2) Notes
(1) How to disable the attribute name check of the custom tag
Use one of the following methods to control the occurrence of translation errors due to mismatch in upper case and lower case when checking the attribute name of the custom tag:
- Specify true in the parameter webserver.jsp.translation.customAction.ignoreCaseAttributeName in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file.
For details on the Easy Setup definition file and the parameters to be specified, see 4.6 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.
- Compile JSP by specifying the -usebeannocheckduplicateid option in the cjjspc command.
For details on the command, see cjjspc (JSP pre-compilation) in the uCosminexus Application Server Command Reference Guide.
If there are case-sensitive attributes, do not control the occurrence of translation errors because of mismatch in the upper case and the lower case. If such translation errors are controlled, the following problems will occur:
- If multiple attributes that are only distinguished by the upper case or the lower case are specified in the JSP custom tag
The setter method of the tag handler is executed for each of the attributes. At this time, even if the same attributes are specified several times, the translation error does not occur. Therefore, the setter method might be executed for multiple identical attributes.
- If tag handler corresponding to the attribute name distinguished only by the upper case or the lower case is implemented
The setter method of the attribute described first in the TLD file or tag file is invoked without case-sensitivity. At this time, the translation error does not occur. Therefore, you might not be able to invoke the intended setter method.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.