Assuming that somepage.html is found in the root directory of your
web/jsp-server the following two examples should do the trick:
response.sendRedirect("somepage.html");
or
getServletContext().getRequestDispatcher("/somepage.html").forward(request,
response);
The second example is more powerful since it preserves the request and
response objects. However the address has to be properly prepared in that it
is not relative to the current page, but to the root directory of the
web/jsp-server.
I hope this helps you.
Cor
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Brown
Sent: Friday, December 17, 1999 1:10 PM
To: [EMAIL PROTECTED]
Subject: Redirect w/ JSP
Does anyone know what the equivalent of:
<% Response.Redirect("somepage.html") %>
is in JSP?
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html