tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Emenaker" <...@emenaker.com>
Subject How do I add another webapp?
Date Wed, 25 Oct 2000 21:49:33 GMT
I posted this a couple of days ago and I didn't get any response, so here
goes again:

I've just installed Tomcat (3.1.99b6, it looks like).

I'm trying to add another servlet context, but it's just not working.

I added:

   <Context path="/newserv"
             docBase="webapps/mynewservlet"
             debug="9"
             reloadable="true" >
   </Context>

to my /etc/tomcat/server.xml file. Then, I copied the entire
webapps/examples directory contents to webapps/mynewservlet. I deleted all
of the classes in webapps/mynewservlet/WEB-INF/classes, replaced them with
my new ones, and then edited the webapps/mynewservlet/WEB-INF/web.xml to
look like:

  <servlet>
    <servlet-name>
        MyServ
    </servlet-name>
    <servlet-class>
        mypackage.Default
    </servlet-class>
  </servlet>
  <servlet-mapping>
      <servlet-name>
          MyServ
      </servlet-name>
      <url-pattern>
          /myserv
      </url-pattern>
  </servlet-mapping>


Then, when I try to go to tomcat and ask for "/newserv/myserv", I get:

java.lang.NullPointerException
  at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
ava:471)
   at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad
er.java:174)
   at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265)
  at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
  at org.apache.tomcat.core.Handler.service(Handler.java:243)
  at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
  at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78
6)
  at org.apache.tomcat.core.ContextManager.service(ContextManager.java:732)
  at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
  at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407)
  at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
  at java.lang.Thread.run(Thread.java)

In the logs, I get essentially the same thing, but with "Exception in
it   - java.lang.NullPointerException:" right before the stacktrace.

Ideas?

- Joe




Mime
View raw message