uCosminexus Application Server, Web Container Functionality Guide

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

2.5.7 Class names in JSP compilation results

This subsection describes the format and the conversion rules of the class names generated from the JSP file or tag file.

Organization of this subsection
(1) Class name format
(2) Class name conversion rules

(1) Class name format

The class name format of the classes generated from JSP files or tag files depend on the file type and whether the JSP debug functionality is enabled. The following table lists the class name formats:

Table 2-14 Class name format of classes generated from JSP files or tag files

File type When the JSP debug functionality is disabled When the JSP debug functionality is enabled
JSP files file-name file-name_jsp
Tag files file-name_ file-name_tag

The rules specified in (2) Class name conversion rules are applied to file-name.


(2) Class name conversion rules

If the name of the class generated from the JSP file or tag file contains characters that cannot be used as class name, underscore (_), or dollar sign ($), the following conversion rules are applied sequentially:

  1. If the first character is the package name and a character that cannot be used at the beginning of the class name, add a dollar sign ($) at the beginning.
  2. Convert a period (.) in the middle of the file name into a dollar sign ($).
  3. For the characters that cannot be used as the class name, convert the underscore (_) and the characters that cannot be used into a string of 4-digit hexadecimal expression.
    The alphabetical characters used in the hexadecimal expression will be in the lower-case.

The conversion rule in step 1 is applied only to the first character. The conversion rules in step 2 and 3 are applied sequentially from the beginning of the string.

The following table describes the conversion examples for names of classes generated from JSP files or tag files:

Table 2-15 Conversion examples for names of classes generated from JSP files or tag files

File type File name JSP debug functionality Class name
JSP files index.jsp -- index$jsp
Y index$jsp_jsp
10test-10.jspx -- $10test_002d10$jspx
Y $10test_002d10$jspx_jsp
test.tag -- test$tag
Y test$tag_jsp
Tag files tagfile1.tag -- tagfile1$tag_
Y tagfile1$tag_tag
Tag_File$10.tagx -- Tag_005fFile_002410$tagx_
Y Tag_005fFile_002410$tagx_tag

Legend:
Y: Valid
--: Invalid