You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by JB...@silenus.com on 2001/05/22 22:01:29 UTC

Changing default servlet url

I'm in the process of switching from JServ to Tomcat.  All the servlets
that were running previously are running now on tomcat but they have
different urls.  I need the url to be the same as it was before I switched
to tomcat and am having trouble.

My servlet is in:
     c:\tomcat\webapps\dir1\WEB-INF\classes
I used the same setup as the examples.  To reach that servlet you have to
use the following url:
http://localhost/dir1/servlet/ServletName

I need the url to not have the 'servlet' in it.  Anybody know how to do
this?  Also, how does tomcat determine the servlet is in the
WEB-INF\classes directory?  Does it alias that as 'servlet'?  If so, where
is this done?

Frustrated...

Jason E. Brawner
Consultant
Silenus Group, Inc.
248.735.8077 Ext. 184
810.252.9944 Cellular


RE: Changing default servlet url

Posted by Martin van den Bemt <mv...@mvdb.com>.
Here is the solution to that problem. 2 assumptions :
Using apache + mod_jk + tomcat. I included the mod_jk.conf (do an Include in
the httpd.conf from apache) and the server.xml. Look for the webapps/cubic
context and replace with your own stuff..
You (probably) need some fixing on some settings.
You servlets will be reachable under /servlet/ and with a bit of luck under
/servlets/ (it's bin a while since I used this build..)

Have fun,
Martin van den Bemt


> -----Original Message-----
> From: JBrawner@silenus.com [mailto:JBrawner@silenus.com]
> Sent: Tuesday, May 22, 2001 10:01 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Changing default servlet url
>
>
> I'm in the process of switching from JServ to Tomcat.  All the servlets
> that were running previously are running now on tomcat but they have
> different urls.  I need the url to be the same as it was before I switched
> to tomcat and am having trouble.
>
> My servlet is in:
>      c:\tomcat\webapps\dir1\WEB-INF\classes
> I used the same setup as the examples.  To reach that servlet you have to
> use the following url:
> http://localhost/dir1/servlet/ServletName
>
> I need the url to not have the 'servlet' in it.  Anybody know how to do
> this?  Also, how does tomcat determine the servlet is in the
> WEB-INF\classes directory?  Does it alias that as 'servlet'?  If so, where
> is this done?
>
> Frustrated...
>
> Jason E. Brawner
> Consultant
> Silenus Group, Inc.
> 248.735.8077 Ext. 184
> 810.252.9944 Cellular
>
>