tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Emenaker" <...@emenaker.com>
Subject Re: How do I add another webapp?
Date Wed, 25 Oct 2000 22:52:25 GMT
> For 3.1 it is in the /tomcat/conf directory, not the etc/tomcat directory

Ah, that's /usr/share/tomcat/conf in my neck of the woods.

Mine's called uriworkermap.properties-auto and, get this, it already has an
entry for the stuff I added in /etc/tomcat/server.xml. (I guess that's where
the "auto" part comes in, huh?).

Anyway, in /etc/tomcat/server.xml, I have:
    <Context path="/hockey"
          docBase="webapps/hockeystats"
          debug="9"
          reloadable="true" >
   </Context>

Then, in /usr/share/tomcat/conf/uriworkermap.properties-auto, I have:
  #########################################################
  # Auto configuration for the /hockey context starts.
  #########################################################

  #
  # The following line mounts all JSP file and the /servlet/ uri to tomcat
  #
  /hockey/servlet/*=$(default.worker)
  /hockey/*.jsp=$(default.worker)

  #
  # If you want tomcat to serve all the resources (including static) that
  # are part of the /hockey context, uncomment the following line
  #
  # /hockey/*=$(default.worker)
  #######################################################
  # Auto configuration for the /hockey context ends.
  #######################################################

and in /usr/share/tomcat/webapps/hockeystats/WEB-INF/web.xml, I have:

      <servlet-name>
          HockeyStats
      </servlet-name>
      <servlet-class>
          HockeyStats.Default
      </servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>
            HockeyStats
        </servlet-name>
        <url-pattern>
            /Hockey
        </url-pattern>
    </servlet-mapping>


So, then, if I try asking tomcat for /hockey/Hockey (as is implied by
server.xml and web.xml) or /hockey/servlet/Hockey (as is implied by
uriworkermap.properties-auto and web.xml), I get the NullPointerException
from AdaptiveClassLoader. Either way, doesn't work.

Another question: Why the redundant info in server.xml and
uriworkermap.properties-auto? It seems like uriworkermap.properties just
defines the handler for uri parsing for each webapp, which could be defined
in server.xml... and, as an added bonus, it would be in xml format.

> -----Original Message-----
> From: Joe Emenaker [mailto:joe@emenaker.com]
> Sent: Wednesday, October 25, 2000 3:19 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: How do I add another webapp?
>
>
> > At least in Tomcat 3.1 you had to modify the uriworkermap.properties
file
> in
> > tomcat's conf directory in addition to the server.xml file. Add
> >
> > /newserv/*=ajp12
>
> I have no uriworkermap.properties file in /etc/tomcat. All I have is:
>
> -rw-r--r--    1 root     root        11246 Oct 25 14:19 server.xml
> -rw-r--r--    1 root     root          217 Oct 20 18:40 tomcat-users.xml
> -rw-r--r--    1 root     root          849 Oct 23 21:46 tomcat.policy
> -rw-r--r--    1 root     root        15725 Oct 16 17:00 web.xml
>


Mime
View raw message