tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Nikelshpur <dnikels...@yahoo.com>
Subject Re: Unable to use RequestDispatcher.forward() for HTML pages when in Tomcat 4
Date Fri, 22 Feb 2002 09:36:44 GMT
Hi Sriram,

Try changing the .html extension to .jsp extension....This should work 
if your JSP pages work :-)

Dmitry

Sriram Narayanan wrote:

>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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
>Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
>
>



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message