File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions about request dispatching

 
Anshum Kocher
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
1. When a servlet forward a incoming request to say a JSP any code i write after the forward call is redundant?
2. If the servlet ask the browser to issue a seprate request at redirection how are the request and response objects preserved?

Any responses would be greatly appreciated.
Thanks
 
Amit Ghorpade
Bartender
Posts: 2851
10
Fedora Firefox Browser Java
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Any code that tries to writ to the output after is forward is of no use.
2) No they are not preserved for a fresh browser request (sendRedirect).
For more info, check this .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic