1 kumpf 1.1.2.1 //%/////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 kumpf 1.1.2.1 //==============================================================================
23 //
24 // Author: Bapu Patil, Hewlett-Packard Company
25 // (bapu_patil@hp.com)
26 //
27 // Modified By:
28 // Warren Otsuka, Hewlett-Packard Company
29 // (warren_otsuka@hp.com)
30 //
31 //%/////////////////////////////////////////////////////////////////////////////
32
33 Configuring CIMServlet with Apache and Tomcat
34 =============================================
35
36 The CIMServlet interface provides a way for CIM client applications to access
37 CIM information via a Web Server running on the system. CIM clients who wish to
38 communicate with CIMServer running in conjunction with a Web Server may send
39 xmlCIM data over HTTP to the CIMServlet without changing their current
40 code. This allows TCP port 80 to be used for both HTTP and xmlCIM requests.
41
42 Please note that there may be other ways of doing the setup. This a simple
43 kumpf 1.1.2.1 example of how to do the configuration.
44
45 1. To enable servlet input
46 --------------------------
47 In order to enable CIMServer to process the servlet requests the following may
48 be set in cimservlet.properties:
49
50 port=5988
51 This is the default TCP port used by CIMServer to receive xmlCIM requests.
52
53 logDir=/var/pegasus/logs/
54 This is the directory for both logging and tracing.
55
56 servletLog=true
57 Setting to true enables logging.
58
59 servletLogFileName=PegasusServlet.log
60 File name for the logging file.
61
62 servletTrace=true
63 Setting to true enables tracing.
64 kumpf 1.1.2.1
65 servletTraceFileName=PegasusServlet.trace
66 File name for the tracing file.
67
68 localAuthentication=false
69 Setting to true enables local authentication for the servlet.
70
71 2. Configuring CIMServlet in Tomcat
72 -----------------------------------
73
74 There are two configuration files that need to be configured in order for
75 CIMServlet to communicate with CIMServer.
76
77 Use of either the servlet interface or the Pegasus HTTP server interface for
78 xmlCIM requests should be transparent to the CIM client. In order to
79 forward all /CIMOM HTTP requests to CIMServlet, the following should be done:
80
81
82 tomcat.conf - tomcat configuration file
83 ------------------------------------------
84
85 kumpf 1.1.2.1 Add the following entry into tomcat.conf:
86
87 ############ Context mapping for CIMOM
88 #
89 ApJServMount /cimom /examples
90
91
92 This makes the /cimom directory the 'ROOT' directory for the CIM
93 servlet. All the requests that come into /cimom shoud be forwarded
94 to TOMCAT.
95
96 web.xml - tomcat configuration file
97 ---------------------------------------
98
99 Add the following entry into the file web.xml to set an alias to
100 CIMServlet:
101
102 <web-app>
103 <servlet>
104 <servlet-name>cimom</servlet-name>
105 <servlet-class> org.opengroup.pegasus.servlet.CIMServlet </servlet-class>
106 kumpf 1.1.2.1 <load-on-startup> -2147483646 </load-on-startup>
107 </servlet>
108 <servlet-mapping>
109 <servlet-name>cimom</servlet-name>
110 <url-pattern> /cimom </url-pattern>
111 </servlet-mapping>
112 </web-app>
113
114
115 3. To turn on DEBUG Tracing in CIMServlet
116 ------------------------------
117
118 If you would like to turn on debug logging in CIMServlet, you will need specify
119 the cimservlet.properties file location. The following properties
120 should be set to the appropriate values in cimservlet.properties:
121
122 logDir=/var/pegasus/logs/
123 servletTrace=true
124 servletTraceFileName=PegasusServlet.trace
125
126 The following should be added to web.xml file:
127 kumpf 1.1.2.1
128 <web-app>
129 <servlet>
130 <servlet-name>cimom</servlet-name>
131 <servlet-class> org.opengroup.pegasus.servlet.CIMServlet
132 </servlet-class>
133 <init-param>
134 <param-name>cimconfigfile</param-name>
135 <param-value> /var/pegasus/conf/cimservlet.properties
136 </param-value>
137 </init-param>
138 <load-on-startup> -2147483646 </load-on-startup>
139 </servlet>
140 <servlet-mapping>
141 <servlet-name>cimom</servlet-name>
142 <url-pattern> /cimom </url-pattern>
143 </servlet-mapping>
144 </web-app>
145
146 Where
147 <param-value>Absolute Path of cimservlet.properties file</param-value>
148 kumpf 1.1.2.1
149
150 4. Set CLASSPATH to CIMServlet class
151 ------------------------------------
152 Make sure that TOMCAT knows where the CIMServlet class is located before
153 starting Tomcat.
154
155 5. Stop and Restart Tomcat
156 --------------------------
157 Stop Tomcat by running $TOMCAT_HOME/bin/shutdown.sh
158 Start Tomcat by running $TOMCAT_HOME/bin/startup.sh
159
160
161 For additional documentation on the Apache Web Server and Tomcat see
162 http://www.apache.org/.
163
|