Entering content frame

Object documentation The Deployment Descriptor Locate the document in its SAP Library structure

Definition

In Java programming, deployment refers to the process of installing the Web application in the Web server environment. Among other things, the deployment process ensures that the files and other resources are stored in the right places and that all the information the Web server needs to run the application is available.

The relevant web.xml file contains the "Web Application Deployment Descriptor" of the Java Web application. This descriptor (an XML document) defines the configuration of the Web application and contains all the information the Web server needs. This information is needed to install (deploy) the clientinfo.war file (delivered by SAP) to the Web server environment and to control, for example, saving the individual files in the correct directories. This Web ARchive (.war) file is a packed Web application.

Delivering the Web application as the Web Archive file clientinfo.war makes deployment easier, since all the files needed for this Web application are installed in the correct hierarchical structure on the Web server.

Use

To deploy a Web application successfully the system requires certain information, which must be formulated in the Deployment Descriptor web.xml file. Before you can set up a servlet you must specify the servlet element of the Deployment Descriptor web.xml more exactly.

The configuration information, which the Deployment Descriptor of the Java Web application ClientInfo describes, includes :

The ClientInfoInitializer servlet, however, requires additional information that is passed to it initialization. This information is defined in the Deployment Descriptor element <servlet>.

The initialization parameters of the ClientInfoInitializer servlet include:

  1. Parameters specifying the class to be implemented using the ClientInfo interface. .

...
<init-param>
<param-name>com.sap.mobile.clientinfo.ClientInfoImpl</param-name>
<param-value>com.sap.mobile.clientinfo.DefaultClientInfo</param-value>
</init-param>
...

Note

If you use the SAP implementation, the DefaultClientInfo is used by default for implementing the ClientInfo interface – that is, the above parameters need not be changed. If, however, you use your own implementation of the ClientInfo interface, you must assign the appropriate parameter value to ClientInfoImpl.

  1. Parameters specifying the root directory of the device recognition data

<init-param>
<param-name>com.sap.mobile.clientinfo.Home</param-name>
<param-value>C:\tomcat\webapps\clientinfo\mobile</param-value>
</init-param>

Note

Note that you can save the device recognition data in a different directory. It makes sense to do this if you want to add new devices and want to store the new files temporarily in another directory for test purposes.

  1. Parameters for specifying the trace level

<init-param>
<param-name>com.sap.mobile.clientinfo.TraceLevel</param-name>
<param-value>1</param-value>
</init-param>

The trace level describes the information depth of a log file and is a value from 0 (not logged) to 4 (debug). For the ClientInfo Web application the trace level is set by default to the value 1 (brief).

It may be appropriate in some circumstances – for example, for technical support – to raise the trace level to 4. This would then increase the amount of information contained in the log file, since only then could the error messages accompanying problems be interpreted. However, to set the trace level to a high value all the time would be bad for the performance of the Web application.

Moreover, if you assign a value of 1 to the sub-element <load-on-startup> causes the servlet ClientInfoInitializer to be executed first.

You can edit the parameters of the Deployment Descriptor element <servlet> and thus adapt the directory and data structure to your own Web server. For example, you can change the root directory for the device recognition data of the Java Web application ClientInfo specified by SAP, and set up an appropriate structure for you own enterprise.

For more details on how to do this, refer to Changing Deployment Descriptor Elements.

Leaving content frame