Martin:
Try this:
ServletContext sc = getServletContext();
RequestDispatcher rd = sc.getRequestDispatcher("myValue.html");
rd.forward(request, response);
. . . . . . . . . . . . . . . .
Dave Whaley
Developer, Web Applications
Robert Half International, Inc.
(925) 598-5256
. . . . . . . . . . . . . . . .
Date: Wed, 14 Mar 2001 23:24:50 -0800
From: Martin Cooper <[EMAIL PROTECTED]>
Subject: Forwarding to a "private" path
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
I just *know* this has to be an easy question, but my brain won't
cooperate
right now and give me the answer. It won't even come up with the
right query
for the archives. Apologies in advance...
Given a particular request with the appropriate parameters, my
servlet needs
to ship back the contents of a static HTML file that lives
underneath my
WEB-INF directory. In other words, given a request such as:
http://zaphod/myApp/myFunction?myParam=myValue
I might want to return the file:
..... \WEB-INF\myFunction\myValue.html
How do I do this?
It seems to me that I need to use RequestDispatcher.forward(), but I
haven't
been able to figure out the right way to invoke it.
Any help would be much appreciated.
--
Martin Cooper
___________________________________________________________________________
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