|
|
server.xml
Any questions and comments are welcome to me.
This is the general configuraiton file for the Tomcat servlet server. What kind of connectors the Tomcat servlet server opens, what contexts are held by this server, how the server logs its actions and so on are defined in this file. Tomcat3.1 binary distribution includes the default of this file, which is $TOMCAT_HOME/conf/server.xml.
All the contexts specified by 'ApJServMount' directive of jserv.conf(or tomcat.conf)(and httpd.conf in case of the virtula host) must reside in the runntime environment of Tomcat servlet server. They can be specified by the 'Context' element of this XML file. In our example, the following 'Context' elements must be specified:
<Context path="/jun_app" docBase="/export/home/jun/webapps/apps" debug="0" reloadable="true" > </Context> <Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" > </Context>Note that the second context path is "", to which the request without the context, such as
For Tomcat to listen to the 'AJP12' request on the port 8007 of the host 'jun_tomcat', the 'Connector' element like below required:
<Connector className="org.apache.tomcat.service.SimpleTcpConnector">
<Parameter name="handler"
value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
<Parameter name="port" value="8007"/>
<Parameter name="inet" value="jun_tomcat"/>
</Connector>
In case that you applied my patch and you'd like to make international parameter strings available, com.oopreserch.tomcat.request.FixCharset must be specified as one the the RequestInterceptor. To decode parameter string properly, this helper class adapts the 'option A' of My Proposal to Servlet and JSP Specificatin, so you need to supply the charset in which the parameter string is encoded. It looks like this:
<RequestInterceptor className="com.oopreserch.tomcat.request.FixCharset" Charset="Shift_JIS" />And if you installed my extention, com.oopreserch.tomcat.request.ParseMime should also be specified:
<RequestInterceptor className="com.oopreserch.tomcat.request.ParseMime" Charset="Shift_JIS" FileUpper="50000" />The 'Charset' attribute is the same one as FixCharset, and the 'FileUpper' means the maximum size of file (in bytes) which can be uploaded. Note that without 'FileUpper', any size of file can be uploaded.
Other elements in the default 'server.xml' can be left untouched, except for the paths of the working directory and the log files. We can point any paths for them, but because the Tomcat servlet server is started as the user of 'nobody'(or any httpd user) by the JServ module, the user of 'nobody' must have the 'write' permission on the following files and directories:
Java and all Java-based trademarks and logos are trademarks or registered of Sun Microsystems, Inc. in the United States and other countries.
|
|
ALL CONTENTS COPYRIGHT 2000
, Jun Inamori. All rights reserved.
Any questions and comments are welcome to
Jun Inamori
.