cjimportwar (Import a WAR application)
Format
- When importing a WAR application of the archive format
cjimportwar [server-name] [-nameserver provider-URL]
-f WAR-file-path [-name application-name]
[-contextroot context-root]
[-c cosminexus.xml-file]
- When importing as a WAR application of the exploded archive format (WAR directory)
cjimportwar [server-name] [-nameserver provider-URL]
-a WAR-directory-path [-name application-name]
[-contextroot context-root]
[-c cosminexus.xml-file]
Function
Imports a WAR application to the specified J2EE server. While importing a WAR application, reads cosminexus.xml in the path specified in the -c option.
Arguments
- server-name
- Specifies the connection destination J2EE server name. When you omit the server name, the host name is used as the server name.
- -nameserver provider-URL
- Specifies the access protocol to CORBA Naming Service, host name on which CORBA Naming Service operates, and the port number used by CORBA Naming Service, in the following format:
protocol-name::host-name:port-number
- For details about the specified contents, see 2.1(2) Provider URL.
- -f WAR-file-path
- Specifies the path of the WAR file to be imported.
- -a WAR-directory-path
- Specifies the path of a WAR directory.
- -name application-name
- Specifies an application name in one or more characters.
- In the application name, you can use the alphanumeric characters (0~9, A~Z, a~z), and the following special characters:
- Plus (+), hyphen (-), period (.), carot (^), underscore (_).
- If you omit the -name option, the J2EE server specifies the application name by replacing the characters that cannot be used, with an underscore (_), based on the WAR file name or WAR directory name. When the application name that the J2EE server sets, duplicates within the J2EE server, the application name is suffixed with a serial number (1 through 2147483647), so that the application name becomes unique within the J2EE server.
- -contextroot context-root
- Specifies the context root.
- In the context root, you can use the characters that can be used with URI (RFC3986). However, you cannot specify a character string that starts with ejb/, web/, /ejb/, and /web/.
- When specifying a root, specify a blank character string or a slash (/).
- When you omit the -contextroot option, the J2EE server specifies the application name by replacing the characters that cannot be used, with an underscore (_), based on the WAR file name or WAR directory name. However, when the character string in which the extension has been removed from a WAR file or a WAR directory name is ejb or web, the name is converted to ejb1 or web1 respectively.
- -c cosminexus.xml-file
- Specifies the path of the cosminexus.xml file. Note that the name of the cosminexus.xml file is cosminexus.xml which consists of all lower case characters.
- When you omit the path of the cosminexus.xml file, the cosminexus.xml file is not read.
Input example
- When importing a WAR application in the archive format
cjimportwar MyServer -f WarApp1.war -name WarApp1 -contextroot app1/appwar -c cosminexus.xml
- When importing a WAR directory as an application of the exploded archive format
cjimportwar MyServer -a WarAppDirPath -name WarApp1 -contextroot app1/appwar -c cosminexus.xml
Return values
- 0:
- The command is terminated normally.
- 1:
- The command is terminated abnormally.
- 2:
- The command could not be executed because of an exclusion error.
- 3:
- A timeout occurred.
- 8:
- An information error occurred at the time of execution.
- 9:
- The command cannot be executed as the administrator privileges are not given (in Windows Server 2012, Windows Server 2008, Windows 8, Windows 7, or Windows Vista).
Notes
- When you want to specify a server name in the arguments of the command, you must specify the server name immediately after the command name. When specifying other arguments after the server name (after the command name, if you omit the server name), you can specify the arguments in any order. However, you cannot switch the order of the option name and the value (example: provider-URL -nameserver) or set the option name and the value as non-supporting (example: -nameserver WAR-file-path -f provider-URL).
- When you specify a server name in the arguments of the command, you must specify a character string that matches with the server name specified in the cjsetup command, with respect to case sensitivity.
- If a J2EE application with the same application name already exists in the import destination J2EE server, this command terminates with an error. However, if you omit the -name option, the application is imported with an application name in which the serial number is added at the end of the application.
- If the name of the application to be imported has more than 255 characters, an error occurs.