>>>>> "kris7077" == kris7077 <KM> writes:
kris7077> We have been successfully using Tomcat 3.2.3 for
kris7077> deploying our application which uses servlets. However
kris7077> to take advantage of the latest we decided to migrate
kris7077> to Tomcat 4.0.1. Now we are having problem deploying
kris7077> the servlets, they just dont work. I have read all the
kris7077> posts here and jguru to figure out what is wrong and
kris7077> how to fix it
kris7077> Here is what I am doing
kris7077> I have
kris7077> the following folder structure
kris7077> com\mycompany\servlets\MainServlet
kris7077> com\mycompany\servlets\domain\OtherServlet
kris7077> I have the following structure setup in webapps
kris7077> com
kris7077> --mycompany
kris7077> --WEB-INF
kris7077> web.xml
kris7077> --classes
kris7077> --com
kris7077> --mycompany
kris7077> --servlets \MainServlet.class
kris7077> --domain\OtherServlet.class
kris7077> The following is the mapping in my server.xml
kris7077> <Context path="/com/mycompany"
kris7077> docBase="com/mycompany"
kris7077> debug="0" reloadable="true"/>
kris7077> <Context path="/com/mycompany\servlets"
kris7077> docBase="com/mycompany/servlets" debug="0"
kris7077> reloadable="true"/>
kris7077> Here is how my web.xml looks after all the filter
kris7077> stuff
kris7077> <servlet-mapping>
kris7077> <servlet-name>
kris7077> MainServlet
kris7077> </servlet-name>
kris7077> <url-pattern>
kris7077> /com/mycompany/servlets/MainServlet/*
kris7077> </url-pattern>
kris7077> </servlet-mapping>
kris7077> The catalina log file shows that the application is
kris7077> not being deployed. It does not find the web.xml file
kris7077> inthe WEB-INF folder. I followed suggestions and
kris7077> created the folder from command prompt..
kris7077> I am I doing anything wrong here?
Some of this is a problem, some of it just doesn't have to be this complicated.
First, I suggest the following structure in the "webapp" directory:
mycompany/WEB-INF/web.xml
mycompany/WEB-INF/classes/com/mycompany/servlets/MainServlet.class
mycompany/WEB-INF/classes/com/mycompany/servlets/domain/OtherServlet.class
Then, define a SINGLE context in "server.xml":
<Context path="/mycompany" docBase="mycompany" debug="0" reloadable="true"/>
Then, in your "web.xml", the only thing I would change would be the
"url-pattern" for your servlets, to be the following (including the path-info,
which you seem to want for some reason):
/mycompany/MainServlet/*
/mycompany/OtherServlet/*
(Someone with more experience, please validate this.)
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>