• Post Reply Bookmark Topic Watch Topic
  • New Topic

additional attributes provided to RequestDispatcher

 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am a little unsure of my understanding of values of the additional request-scoped attributes provided by the container when a RequestDispatcher is used. My confusion centers around the attributes set when using the include method. Here is my understand, please let me know if I am correct or not.

If a servlet is invoked using the include method, the following attributes are set:
- javax.servlet.include.request_uri - the request uri of the INCLUDED servlet
- javax.servlet.include.context_path - the contect path of the INCLUDED servlet
- javax.servlet.include.servlet_path - the servlet path of the INCLUDED servlet
- javax.servlet.include.path_info - the path info of the INCLUDED servlet
- javax.servlet.include.query_string - the query string of the INCLUDED servlet

If a servlet is invoked using the forward method, the following attributes are set:
- javax.servlet.forward.request_uri - the request uri of the FIRST servlet in the call chain
- javax.servlet.forward.context_path - the contect path of the FIRST servlet in the call chain
- javax.servlet.forward.servlet_path - the servlet path of the FIRST servlet in the call chain
- javax.servlet.forward.path_info - the path info of the FIRST servlet in the call chain
- javax.servlet.forward.query_string - the query string of the FIRST servlet in the call chain

thanks for any insight!
 
Jose Esteban
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what spec say, so you should be rigth. At least, that's what I understand.
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!