Hitachi

uCosminexus Application Server Application Setup Guide


7.2.2 Importing the servlet and JSP (WAR)

Import the servlet and JSP (WAR) before using Web components in the J2EE server mode to execute a J2EE application.

Note that you can import a WAR with a DD conforming to Servlet 2.2, 2.3, 2.4, or 2.5 specifications, or WAR with annotations. Confirm that the DD conforms to the DTD specifications and then import the WAR. If you import a WAR with a DD not conforming to the DTD specifications, a message will be output. For details on the output messages, see the manual uCosminexus Application Server Messages.

Execute the following command to import a WAR file:

Execution format
cjimportres [server-name] [-nameserver provider-URL] -type war -f path-of-WAR-file
Example of execution
cjimportres MyServer -type war -f account.war

For details on the cjimportres command, see cjimportres (import resource) in the uCosminexus Application Server Command Reference Guide.

Note:
  • If you import a WAR with a version 2.2 DD, the DD version in the J2EE server will change to version 2.3.

  • You cannot import a WAR with a DD not conforming to Servlet 2.2, 2.3, 2.4, or 2.5 specifications.

  • The WAR file name specified when importing is used as the directory name of the working directory. When deploying or starting the application, the files in the WAR file are deployed in the working directory. Also, in the WAR file, if there is a class that implements java.rmi.Remote (for example, the home interface), then based on the definition in the usrconf.properties file, a stub is generated in the working directory when deploying or starting the application. When app is specified in the ejbserver.deploy.stub.generation.scope key of the usrconf.properties file, the stubs will be generated for all the interfaces that implement the remote interface included in the Jar file.

    Considering the above points, specify a WAR file name and the package name or the class name of the WAR file and the package name and the class name of the class that implements java.rmi.Remote, so that the path length of the working directory does not reach the upper limit specified for the platform.

    For details on estimating the path length of the working directory, see C.1 Work directory of the J2EE server in the uCosminexus Application Server System Setup and Operation Guide.

  • Do not import a WAR with the name hitachi-runtime.jar.