I assume you've looked through all the elements available to you in web.xml.
(I can't think of any that might help, but I'm no authority!)
One (reasonably simple) solution would be to write yourself a servlet that
performs the mapping for you.  Assuming the root of the path remains
constant for your requests like this, map that to the servlet.
The servlet then has to examine the final part of the URL, lookup against
your mapping-list (which you should really load up from an XML file during
class-load, but you *could* hard code it), and then either redirect or
forward to your required resource.   (Redirect involves an extra round-trip
and will mean that the user sees a URL that ends with the real filename;
forwarding will leave the "original" URL in place.)

Mike.

----- Original Message -----
From: "RXZ JLo" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 06, 2002 9:50 AM
Subject: RE: static url routing



--- "Noel J. Bergman" <[EMAIL PROTECTED]> wrote:
> > my html files have long names like
> > a_b_c_d_xyz213_e_f_g.html,
> a_b_c_d_pqr983_e_f_g.html
>
> > is it possible to have urls like
> > http://localhost:8080/myapp/html/xyz213
> > point to the first file above?
>
> You can use either a Filter, or mod_rewrite in
> Apache httpd.
>

I had a glance at javax.servlet.Filter - with this I
cannot avoid entering a servlet, which will then wont
be 'static' response.


> --- Noel
>

Thanks
rf

To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to