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