tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Url rewrite
Date Thu, 06 Jun 2002 15:51:46 GMT
You can map servlets in your web.xml to almost any URL pattern you want.

If your webapp is installed under the ROOT context, add the following
into your web.xml:

See the Servlet Spec, section 11 "Mapping Requests To Servlets", for
full details.

If after reading the spec you conclude it's insufficient, you can always
place simple HTML forwarding files, e.g.
<meta http-equiv=REFRESH content="0; URL=/servlet/fooName">
where you need them.

And if all the above doesn't meet your needs, you're probably better off
adding apache or another server that does fancier URL-rewriting for you

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: Colin Chalmers []
>Sent: Thursday, June 06, 2002 11:43 AM
>Subject: Url rewrite
>I've been searching for info concerning url rewriting/mapping with
>but can't seem to find a definitive answer (except to use Apache with
>I would like to access a servlet
>(http://localhost:8080/fooDir/servlet/fooName) with a *nice* name such
>I've found info whereby server.xml can be changed to map foo to fooDir
>something similiar in the web.xml but I have to say that I got lost in
>mountain of answer attempts, each time proposing a (slightly) different
>Can it be done? If so who can show me the light?
>Thx in advance
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>For additional commands, e-mail: <mailto:tomcat-user-

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message