You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian Kreitzer <kr...@yahoo.com> on 2001/11/05 05:31:16 UTC

Has anyone gotten RequestDispatcher.forward to work on NT

I'm on NT4.0 SP6 using Tomcat 4.0.


--- Brian Kreitzer <kr...@yahoo.com> wrote:
> For the life of me I can't get this to work or the
> .include function.  Here is my code:
> 
> public class HelloWorldExample extends HttpServlet {
> 
> 
>     public void doGet(HttpServletRequest request,
>                       HttpServletResponse response)
>         throws IOException, ServletException
>     {
>         ResourceBundle rb =
>            
>
ResourceBundle.getBundle("LocalStrings",request.getLocale());
>         response.setContentType("text/html");
>         PrintWriter out = response.getWriter();
> 
>                         String address = "/questo/"
> +
> Style.servPath + "Test";
> getServletContext().log("address :" + address);
> getServletContext().log("before dispatcher");
>                         RequestDispatcher dispatcher
> =
> getServletContext().getRe
> questDispatcher(address);
> getServletContext().log("before forward");
>                         dispatcher.include(request,
> response);
> getServletContext().log("After forward");
>                         return;
>     }
> }
> 
> 
> If I type in http://localhost/questo/servlet/Test
> into
> my browser, the servlet page loads.  It is a very
> simple servlet almost exactly like the
> HelloWorldExample servlet except I changed the title
> to say Just Testing! instead of Hello World!
> All I get is a blank screen in my browser and the
> following in the localhost_log.2001-11.02.txt log
> file:
> 
> 2001-11-02 22:15:50
> InvokerFilter(ApplicationFilterConfig[name=Path
> Mapped
> Filte
> r, filterClass=filters.ExampleFilter]): 20
> milliseconds
> 2001-11-02 22:25:51 address :/questo/servlet/Test
> 2001-11-02 22:25:51 before dispatcher
> 2001-11-02 22:25:51 before forward
> 2001-11-02 22:25:51 After forward
> 2001-11-02 22:25:51
> InvokerFilter(ApplicationFilterConfig[name=Path
> Mapped
> Filte
> r, filterClass=filters.ExampleFilter]): 10
> milliseconds
> 
> There are no errors that I see.  Can someone help me
> with this?  I tried Tomcat 3.2.3 then installed 4.0
> and I get the same behavior in both.
> 
> Thanks,
> 
> 
> =====
> Brian Kreitzer
> 
> Owner
> Kreitzer Kreations
> 
> __________________________________________________
> Do You Yahoo!?
> Find a job, post your resume.
> http://careers.yahoo.com
> 
> --
> To unsubscribe:  
> <ma...@jakarta.apache.org>
> For additional commands:
> <ma...@jakarta.apache.org>
> Troubles with the list:
> <ma...@jakarta.apache.org>
> 


=====
Brian Kreitzer

Owner
Kreitzer Kreations

__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>