You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sriram Narayanan <sr...@yahoo.com> on 2002/02/21 15:36:33 UTC
Unable to use RequestDispatcher.forward() for HTML pages when in Tomcat 4
Hello all,
I am able to use the RequestDispatcher forward control from one JSP page to another. However I am unable to forward to HTML pages.
>From what I read in the Servlet API spec (there's an example for /garden/ etc) and the docs for RequestDispatcher(), one should indeed be
able to forward to HTML pages....
Here's what I have in my JSP:
<%getServletContext().getRequestDispatcher("/html/authhome.html").forward(request,response);%>
And here's what I found in the generated JSP page:
--- beginepartial quote -----
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// begin [file="/notauthorized.jsp";from=(0,2);to=(0,92)]
getServletContext().getRequestDispatcher("/html/authhome.html").forward(request,response);
// end
// HTML // begin [file="/notauthorized.jsp";from=(0,94);to=(1,0)]
out.write("\r\n");
// end
----- end partial quote ----
Could someone please point me to what it is that I'm doing wrong ?
I have only the Servlet API spec with me, and not the JSP spec, which I have not been able to download yet (Internet connection problems)
Thanks,
Sriram
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>