|
|
web.xml
Any questions and comments are welcome to me.
'web.xml' file must reside in 'WEB-INF' directory under each document base directory, which is specified in 'server.xml' corresponds to each context. In our exmaple,
<servlet>
<servlet-name>
jun_test
</servlet-name>
<servlet-class>
TestServlet
</servlet-class>
<init-param>
<param-name>
jun_para
</param-name>
<param-value>
hello
</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>
jun_test
</servlet-name>
<url-pattern>
/myservlet
</url-pattern>
</servlet-mapping>
The request of "http://www.foo.com/jun_app/myservlet" is redirected to Tomcat by JServ, and Tomcat invokes
In case that you applied my patch and you'd like enable com.oopreserch.tomcat.servlets.StatusServlet, you need to regiter it in this file with the appropriate 'url-pattern'.
To handle the request from the 'jserv-status' function of the JServ module, the servlet server must hold the servlet which can be invoked by the 'url-pattern' of '/org.apache.jserv.JServ'. As I described above, the mapping of the 'url-pattern' and the servlet can be defined in 'WEB-INF/web.xml' which resides in the document base corresponding to the requested context. In case of this request, such a servlet must be stored in the context of "", which can be configured by
<servlet-name>
status
</servlet-name>
<servlet-class>
org.apache.tomcat.servlets.StatusServlet
</servlet-class>
<servlet-name>
status
</servlet-name>
<url-pattern>
/org.apache.jserv.JServ
</url-pattern>
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
.