This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

additional attributes provided to RequestDispatcher  RSS feed

 
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!