Are you sure about this?? This is the first mention I've ever heard of
uriworkermap.properties in all the mailing list discussions about adding new
contexts and servlets. Where is this documented??
-----Original Message-----
From: Steve Haines [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 26 October 2000 07:47
To: '[EMAIL PROTECTED]'
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
- Note if Tomcat 3.2b6 uses a different thread than ajp12, use that one
instead (make it look like the /examples/*=.. line)
Good luck!
Steve
-----Original Message-----
From: Joe Emenaker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 2:50 PM
To: [EMAIL PROTECTED]
Subject: How do I add another webapp?
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