Ramesh Kesavanarayanan wrote:
>
> you can use
> PrintWriter out = res.getWriter();
> out.println(" <jsp forard />");
> out.flush();
> out.close();

No, I'm afraid that's not correct (even if you fix the spelling of
"<jsp:forward>"). The output written by a servlet to "out" is sent
to the browser, and the browser has no idea what to do with a
<jsp:forward> tag. Only a JSP container, that parses a JSP page,
knows how to handle this tag (and all other JSP tags).

If you want to forward from a servlet, look at the RequestDispatcher
class in the Servlet API.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.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