13.9.5 Determining the context root

Specify the context root in the -contextroot option of the cjimportwar command. Specify the characters that can be used with URI (RFC3986) in the -contextroot option. If you specify a character that cannot be used with URI (RFC3986) or a string beginning with ejb/, web/, /ejb/, and /web/, the KDJE37206-E message is output. For details on the cjimportwar command, see cjimportwar (Importing WAR applications) in the uCosminexus Application Server Command Reference Guide.

If the -contextroot option is not specified in the cjimportwar command, the J2EE server determines the context root based on the WAR file name (in the archive format) or WAR directory name (in the exploded archive format) as follows:

The following tables describe examples of determining the context root.

Table 13-26 Example of determining the context root (In the archive-format WAR applications)

-contextroot option of the cjimportwar commandWAR file nameContext root
example/ServletSampleWeb.warexample/Servlet
(Not specified)SampleWeb.warSampleWeb

Table 13-27 Example of determining the context root (in the exploded archive-format WAR applications)

-contextroot option of the cjimportwar commandDirectory name of the WAR applicationContext root
example/ServletSampleWebexample/Servlet
(Not specified)SampleWebSampleWeb

If you execute the cjlistapp command, the context root is output in the displayed string. For details on the cjlistapp command, see cjlistapp (Displaying a list of applications) in the uCosminexus Application Server Command Reference Guide.