Ok, so I extended WebXmlReader and added the functionality I need and
compiled it. I added the class to /tomcat/classes/. I updated my modules.xml
and server.xml to use my new CustWebXmlReader. I think everything is set up
right.
When I start Tomcat I get A class not found Exception though:
E:\scripts>ERROR reading E:\jakarta-tomcat-3.3-b2\conf\server.xml
At Line 28 /Server/ContextManager/CustWebXmlReader/ validate=true
java.lang.ClassNotFoundException:
org.apache.tomcat.facade.CustWebXmlReader
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native
Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
According to the user docs, if you make a classes dir: "Any class that you
add to this directory will find its place in Tomcat's classpath." Am I doing
something wrong here. I would prefer not to have to re-jar all of the tomcat
classes.
Thanks
Matt
-----Original Message-----
From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 11:26 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Two contexts sharing one WebApp
Hi Matt,
Use of web.xml is mandated by the Servlet 2.2 spec, so there
isn't supposed to be a way to do what you want. However,you are
welcome to try customizing org.apache.tomcat.facade.WebXmlReader
to make a choice somehow.
Cheers,
Larry
> -----Original Message-----
> From: Matt Small [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 2:11 PM
> To: Tomcat (E-mail)
> Subject: Two contexts sharing one WebApp
>
>
>
> I have my tomcat server set up with two contexts that share
> the same web-app
> directory. I want to specify a different web.xml in each
> context though so
> that different servlets are available from each context. Is
> there any way to
> specify the web.xml file name or path from the context
> definition? I am
> hoping that there is just a simple config line for this. I
> know I get the
> behavior I want by building my code into two different
> web-apps, but I want
> to keep my build file simple. I am using Tomcat 3.3 beta 2.
>
> Thanks,
> Matt
>