tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <its_toas...@yahoo.com>
Subject Re: creating a directory under webapps
Date Fri, 01 Nov 2002 21:17:37 GMT
This is because the invoker servlet mapping is
commented out by default in Tomcat 4.1.12.

There are several ways of dealing with this.

1. Remove the comments around the invoker servlet
mapping in web.xml

<!-- The mapping for the invoker servlet -->
  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>

This is not recommended since a malicious person could
then invoke anonymous servlets on your Tomcat
instance.

2. Add the following to your application web.xml file.

<!-- trying the invoker servlet -->
    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>

This has the same security concerns as item 1, but it
is now limited to your application and not Tomcat as a
whole.

3. Add a servlet mapping for each servlet in your
application.  This means that you will no longer have
anonymous servlets.  An example is given below.

<servlet>
  <servlet-name>example1</servlet-name>
  <display-name>example1</display-name>
  <servlet-class>a.b.class</servlet-class>
</servlet>

<!-- servlet mapping -->
<servlet-mapping>
  <servlet-name>example1</servlet-name>
  <url-pattern>servlet/example1</url-pattern>
</servlet-mapping>

I ran into this same problem when moving from 4.0.x to
4.1.12.

Hope this helps.

/mde/

just my two cents . . . .

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message