hmm...
Try the following.

Move the XML files to another directory (say ../xml/anyfile.xml)

So now when a user tries to access http://myserver.com/anyfile.xml s/he will
get a "404 Not Found"

There should be a way in TomCat to handle this exception (like redirecting
it to a Jsp page)
(I am not very familiar with TomCat so would not be able to point out that
particular property)

In that Jsp page get the name of the xml file from the requested URL and
redirect the response to
http://myserver.com/servlet/myservlet?file=anyfile.xml

Hope this helps
-Tallaj

----- Original Message -----
From: ARPON Martín DST <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 28, 2001 10:35 AM
Subject: redirecting a page to a servlet


> I 'm using Apache + TomCat.
> I 'm developing a very simple servlet that takes an xml file for imput,
> reads its <xml:stylesheet...> tag, loads the associated XSL and
> outputs plain HTML.
>
> The question is: is there any way I can configure Apache or Tomcat
> to be able to redirect any request made to a static file with extension
> .xml to my servlet ?
>
> The point is: I have my server full of static XML files. Till now, users
> point their browsers to http://myserver.com/anyfile.xml and they get
> the xml file. But, of course, they need IE 5 with MSXML 3.0 installed.
>
> Can I configure the server in a way that the same URL redirects the
> user to, for example:
>
> http://myserver.com/servlet/myservlet?file=anyfile.xml ?
>
> TIA,
>
> Martin
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to