Project

General

Profile

« Previous | Next » 

Revision 2012

Adding in a web.xml file specific to tomcat 5. Notice servlet.jar is
now servlet-api.jar

The tomcat 5 release notes includes this:

------------------------
Enabling invoker servlet:
------------------------

Starting with Tomcat 4.1.12, the invoker servlet is no longer available by
default in all webapps. Enabling it for all webapps is possible by editing
$CATALINA_HOME/conf/web.xml to uncomment the "/servlet/*" servlet-mapping
definition.

Using the invoker servlet in a production environment is not recommended and
is unsupported.

In metacat's tomcat 5 web.xml, I've commented out the invoker servlet lines in
order to avoid the exception.

View differences:

lib/web.xml.tomcat5
1
<!DOCTYPE web-app
2
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
3
        "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
4

  
5
<web-app>
6
    <display-name>monarch</display-name>
7

  
8
    <context-param>
9
      <param-name>jones</param-name>
10
      <param-value>jones@nceas.ucsb.edu</param-value>
11
      <description>
12
      </description>
13
    </context-param>
14

  
15
    <servlet>
16
      <servlet-name>metacat</servlet-name>
17
      <servlet-class>edu.ucsb.nceas.metacat.MetaCatServlet</servlet-class>
18
      <init-param>
19
        <param-name>debug</param-name>
20
        <param-value>1</param-value>
21
      </init-param>
22
      <init-param>
23
        <param-name>listings</param-name>
24
        <param-value>true</param-value>
25
      </init-param>
26
      <load-on-startup>1</load-on-startup>
27
    </servlet>
28
    
29
     <servlet>
30
      <servlet-name>replication</servlet-name>
31
      <servlet-class>edu.ucsb.nceas.metacat.MetacatReplication</servlet-class>
32
      <init-param>
33
        <param-name>debug</param-name>
34
        <param-value>1</param-value>
35
      </init-param>
36
      <init-param>
37
        <param-name>listings</param-name>
38
        <param-value>true</param-value>
39
      </init-param>
40
      <load-on-startup>1</load-on-startup>
41
    </servlet>
42

  
43
    <!--
44
    <servlet-mapping>
45
        <servlet-name>invoker</servlet-name>
46
        <url-pattern>/servlet/*</url-pattern>
47
    </servlet-mapping>
48
    -->
49

  
50
    <servlet-mapping>
51
        <servlet-name>metacat</servlet-name>
52
        <url-pattern>/metacat</url-pattern>
53
    </servlet-mapping>
54

  
55
    <session-config>
56
      <session-timeout>30</session-timeout>
57
    </session-config>
58
</web-app>
0 59

  

Also available in: Unified diff