Colin Wiel wrote:

> I have been beating my head over this one and would be very grateful if
> someone can solve it.
>
> I want to have a single servlet called any time someone hits the url:
> http://www.myserver.com/list/<xxx>.html,
> where anything can be substitured for <xxx>.  So, the same servlet will
> run when someone hits either:
> http://www.myserver.com/list/house.html
> or
> http://www.myserver.com/list/person.html.
>
> Inside the servlet, I will check the URI and see whether it was house or
> person (or whatever else - I expect to have hundreds).  I do not want to
> create an alias in the servlet.properties corresponding to each one, and
> I want to avoid restarting the server each time a new one is added.
>
> I thought I had the problem solved using the AliasMatch directive in
> apache's httpd.conf.
> Using "AliasMatch /list(.*) /dsk1/list/master.html", I got apache to
> map:
> http://www.myserver.com/list/<xxx>.html
> to /dsk1/list/master.html,
> regardless of what is substituted for <xxx>.  However, when I tried:
> AliasMatch /list(.*) /servlet/MyServlet", I get:
> "Forbidden You don't have permission to access /list/aa.html on this
> server" when I went to the URL, even though I can run /servlet/MyServlet
> directly without any problem.
>
> I also tried using wildcards in the servlet.properties:
> "servlet.list(.*).code=MyServlet"
> but that did not work either.
>

use mod_rewrite for this.

Jean-Luc



----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to