You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kenneth Ahn Jensen <ja...@mail.dk> on 2003/09/02 11:02:21 UTC
TC 4.1.24 can't find my servlet-classes?
After using Tomcat for a long time, I seem to be getting into trouble
lately. My Tomcat suddenly does not automatically find the servlets in
<context-dir>/WEB-INF/classes - so I have to make a web.xml file for each
context.
My server.xml is pretty much like the original, except for the user contexts
which all look like this:
<Context path="/user/testuser" docBase="user/testuser" debug="0"
reloadable="true" crossContext="true"/>
The servlets are then placed like:
{$CATALINA_HOME}/webapps/user/testuser/WEB-INF/classes/HelloWorld.class
However, I get a 404 error when requesting
http://ip:port/user/testuser/servlet/HelloWorld - which I'm pretty sure
worked until a month ago (when the system crashed). Also I know for a fact
that it works on TC 4.04.
The {$CATALINA_HOME}/webapps/user/testuser/index.jsp gets loaded just fine
from the URL http://ip:port/user/testuser/index.jsp, so Tomcat has noticed
the context.
Any input will be much appreciated, as I have been trying to make this work
for some time now and I don't seem to get closer... :-(
The server is running students servlets on a university, and a lot of them
are just beginning on programming, so they shouldn't care about deployment
details (at least thats what the teachers tell me, the sysadmin :-).
I'm running Tomcat 4.1.24 with Sun Java 1.4.2 on Redhat 8.0 (and Mandrake
9.1).
--
Mvh
Kenneth
Re: TC 4.1.24 can't find my servlet-classes?
Posted by Kenneth Ahn Jensen <ja...@mail.dk>.
Sonja Löhr wrote:
> sorry, I gave you a wrong path,
> I mean of course
> $CATALINA_HOME/conf/web.xml
Thank you very much.
That was exactly the answer I needed. :-)
--
Mvh
Kenneth
Re: TC 4.1.24 can't find my servlet-classes?
Posted by Sonja Löhr <so...@t-online.de>.
sorry, I gave you a wrong path,
I mean of course
$CATALINA_HOME/conf/web.xml
Am Die, 2003-09-02 um 12.11 schrieb Sonja Löhr:
> Hi, Kenneth!
>
> Since v 4.1.x in $CATALINA_HOME/conf/webapps/web.xml
>
> the servlet-mapping wich maps /servlet/* to the invoker-servlet is
> commented out
>
> <!--
> <servlet-mapping>
> <servlet-name>invoker</servlet-name>
> <url-pattern>/servlet/*</url-pattern>
> </servlet-mapping>
> -->
>
> This happened for security reasons, so it's probably no good idea to
> reintroduce that mapping.
>
> Bye,
> Sonja
>
>
> Am Die, 2003-09-02 um 11.02 schrieb Kenneth Ahn Jensen:
> > After using Tomcat for a long time, I seem to be getting into trouble
> > lately. My Tomcat suddenly does not automatically find the servlets in
> > <context-dir>/WEB-INF/classes - so I have to make a web.xml file for each
> > context.
> >
> > My server.xml is pretty much like the original, except for the user contexts
> > which all look like this:
> >
> > <Context path="/user/testuser" docBase="user/testuser" debug="0"
> > reloadable="true" crossContext="true"/>
> >
> > The servlets are then placed like:
> > {$CATALINA_HOME}/webapps/user/testuser/WEB-INF/classes/HelloWorld.class
> >
> > However, I get a 404 error when requesting
> > http://ip:port/user/testuser/servlet/HelloWorld - which I'm pretty sure
> > worked until a month ago (when the system crashed). Also I know for a fact
> > that it works on TC 4.04.
> >
> > The {$CATALINA_HOME}/webapps/user/testuser/index.jsp gets loaded just fine
> > from the URL http://ip:port/user/testuser/index.jsp, so Tomcat has noticed
> > the context.
> >
> > Any input will be much appreciated, as I have been trying to make this work
> > for some time now and I don't seem to get closer... :-(
> >
> > The server is running students servlets on a university, and a lot of them
> > are just beginning on programming, so they shouldn't care about deployment
> > details (at least thats what the teachers tell me, the sysadmin :-).
> >
> > I'm running Tomcat 4.1.24 with Sun Java 1.4.2 on Redhat 8.0 (and Mandrake
> > 9.1).
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
Re: TC 4.1.24 can't find my servlet-classes?
Posted by Sonja Löhr <so...@t-online.de>.
Hi, Kenneth!
Since v 4.1.x in $CATALINA_HOME/conf/webapps/web.xml
the servlet-mapping wich maps /servlet/* to the invoker-servlet is
commented out
<!--
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
-->
This happened for security reasons, so it's probably no good idea to
reintroduce that mapping.
Bye,
Sonja
Am Die, 2003-09-02 um 11.02 schrieb Kenneth Ahn Jensen:
> After using Tomcat for a long time, I seem to be getting into trouble
> lately. My Tomcat suddenly does not automatically find the servlets in
> <context-dir>/WEB-INF/classes - so I have to make a web.xml file for each
> context.
>
> My server.xml is pretty much like the original, except for the user contexts
> which all look like this:
>
> <Context path="/user/testuser" docBase="user/testuser" debug="0"
> reloadable="true" crossContext="true"/>
>
> The servlets are then placed like:
> {$CATALINA_HOME}/webapps/user/testuser/WEB-INF/classes/HelloWorld.class
>
> However, I get a 404 error when requesting
> http://ip:port/user/testuser/servlet/HelloWorld - which I'm pretty sure
> worked until a month ago (when the system crashed). Also I know for a fact
> that it works on TC 4.04.
>
> The {$CATALINA_HOME}/webapps/user/testuser/index.jsp gets loaded just fine
> from the URL http://ip:port/user/testuser/index.jsp, so Tomcat has noticed
> the context.
>
> Any input will be much appreciated, as I have been trying to make this work
> for some time now and I don't seem to get closer... :-(
>
> The server is running students servlets on a university, and a lot of them
> are just beginning on programming, so they shouldn't care about deployment
> details (at least thats what the teachers tell me, the sysadmin :-).
>
> I'm running Tomcat 4.1.24 with Sun Java 1.4.2 on Redhat 8.0 (and Mandrake
> 9.1).
Re: TC 4.1.24 can't find my servlet-classes?
Posted by John Turner <to...@johnturner.com>.
http://jakarta.apache.org/tomcat/faq/misc.html#invoker
John
Kenneth Ahn Jensen wrote:
> After using Tomcat for a long time, I seem to be getting into trouble
> lately. My Tomcat suddenly does not automatically find the servlets in
> <context-dir>/WEB-INF/classes - so I have to make a web.xml file for each
> context.
>
> My server.xml is pretty much like the original, except for the user contexts
> which all look like this:
>
> <Context path="/user/testuser" docBase="user/testuser" debug="0"
> reloadable="true" crossContext="true"/>
>
> The servlets are then placed like:
> {$CATALINA_HOME}/webapps/user/testuser/WEB-INF/classes/HelloWorld.class
>
> However, I get a 404 error when requesting
> http://ip:port/user/testuser/servlet/HelloWorld - which I'm pretty sure
> worked until a month ago (when the system crashed). Also I know for a fact
> that it works on TC 4.04.
>
> The {$CATALINA_HOME}/webapps/user/testuser/index.jsp gets loaded just fine
> from the URL http://ip:port/user/testuser/index.jsp, so Tomcat has noticed
> the context.
>
> Any input will be much appreciated, as I have been trying to make this work
> for some time now and I don't seem to get closer... :-(
>
> The server is running students servlets on a university, and a lot of them
> are just beginning on programming, so they shouldn't care about deployment
> details (at least thats what the teachers tell me, the sysadmin :-).
>
> I'm running Tomcat 4.1.24 with Sun Java 1.4.2 on Redhat 8.0 (and Mandrake
> 9.1).