I've set up Tomcat so that a request to <anyfile>.html gets redirected to a
servlet (Thanks, Adrian Janssen!). What I haven't been able to figure out,
after looking at the Javadoc for javax.servlet.ServletContext,
javax.servlet.ServletRequest, and others, is how to I determine what file was
originally requested?

My situation is that I have a bunch of HTML files that have had their content
moved into a database. The key for each record is the filename for the HTML
document. I want to poll the database for a file's record and return it from
the central servlet on Tomcat.

So, if someone enters the URL http://hostname/file33.html, and this request
gets redirected to my servlet, how can my servlet find out that it was
file33.html that was requested, and not file34.html? I'm sure that the file
that was requested must be in the request object passed from the browser to the
server, but I can't figure out how to access it.

Any help would be greatly appreciated!

-David Castro
 email[at]davidcastro[dot]com
 http://jsp.davidcastro.com

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to