This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes Forwarding control from Servlet to JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Forwarding control from Servlet to JSP" Watch "Forwarding control from Servlet to JSP" New topic
Author

Forwarding control from Servlet to JSP

kiran nori
Greenhorn

Joined: May 28, 2001
Posts: 12
Hi All,
I would like to know how the control flows when a dispatch is called from the do post method of the servlet.
I have the following code:


The output of this code is

In ViewServlet Dispatiching to View.jsp
In after dispatch
in loop 1 at counter value 0
in loop 1 at counter value 1
in loop 1 at counter value 2
in loop 1 at counter value 3
in loop 1 at counter value 4
in loop 1 at counter value 5
in loop 1 at counter value 6
in loop 1 at counter value 7
in loop 1 at counter value 8
in loop 1 at counter value 9
in loop 1 at counter value 10
in loop 2 at counter value 0
in loop 2 at counter value 1
in loop 2 at counter value 2
in loop 2 at counter value 3
in loop 2 at counter value 4
in loop 2 at counter value 5
in loop 2 at counter value 6
in loop 2 at counter value 7
in loop 2 at counter value 8
in loop 2 at counter value 9
in loop 2 at counter value 10
In finally

and the request/response object gets dispatched to the respective JSP. can any one explain the principle behind dispatching the request.
rgds
Kiran Mohan Nori
I added the ubb code tags for easier reading.
[This message has been edited by Carl Trusiak (edited June 28, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Forwarding control from Servlet to JSP