tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Luc BEAUDET <beau...@toolchest.cyber.kodak.com>
Subject Re: Tomcat: Servlets in another directory
Date Tue, 26 Feb 2002 15:08:12 GMT
"tomcat@bilbao.com" a écrit :

> Hi.
>
> I would like to serve my servlets in another directory
> (not in $TOMCAT_HOME/webapps/examples/WEB-INF/classes).

Just keep in mind one important thing.
$TOMCAT_HOME/webapps represents the appBase="webapps" item of the
default Context attribute.

>
>
> + I created a directory called '/myfoo'.

Where did yu create it, under $TOMCAT_HOME/webapps ?

>
> + I changed $TOMCAT_HOME/conf/server.xml:
> <Context path="" docBase="/myfoo" debug="0" reloadable="true" >

Not sure of what yu did.. means appBase="/myfoo" ?

>
> + I compiled 'HelloWorld.java' into '/myfoo'
> + I changed startup:
> set CLASSPATH=%CLASSPATH%;/myfoo

Ooopps AFAIK modifyin' CLASSPATH doesn't intend any thing for Tomcat
since it builds with it's ClassLoader it' own environnement. The only
way to set a CLASSPATH for it is to modify th ecatalina.sh
UNIX script...

>
>
> But when trying to access: http://localhost:8080/HelloWorld ,
> I get a '404 Error'.

With the server/web.xml not modified, the call would be
http://localhost:8080/servlet/HelloWorld

>
>
> What am I doing wrong?
>
> Regards and thank you very much.
>
> ---------------------------------------------------------
> This mail was sent through TJGROUP Webmail: http://webmail.tjgroup.dk
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

Hope this helps.

Jean-Luc B :O)




--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message