tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Kreitzer <kreitz...@yahoo.com>
Subject RequestDispatcher.forward
Date Sat, 03 Nov 2001 06:32:14 GMT
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:   <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