Try this:
String nextPageId = "/xyz.jsp";
getServletContext().getRequestDispatcher(nextPageId).forward(request,
response);
Note that nextPageId is interpreted as relative to the base of the context
path for the given ServletContext.
In other words if the URL path for the initial jsp page is
http://localhost:8000/app/admin/test/testPage.jsp , then nextPageId should
be set to "/app/admin/hello.jsp"
Hope this helps.
Cor
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Khurram Mahmood
Sent: Monday, November 15, 1999 1:55 PM
To: [EMAIL PROTECTED]
Subject: jsp:forward
Importance: High
Hello all,
I've been trying to use <jsp:forward page="../hello/hello.jsp" /> to forward
the request object from my page to another jsp file. The file, "hello.jsp"
has the code to handle request. But all jsp:forward does is that it gets all
the text (java code and all) from hello.jsp and pastes it as text. This is
what jsp:include is supposed to do. I've read the specs over and over and I
can't seem to figure out the solution to this problem.
How do I forward my request to another jsp page for it to process it?
KM
===========================================================================
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