This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

page 494 HFSJ

 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In page 494 HFSJ says attributes send to jsp:include using jsp aram are request parameters and and can be accessed when we are back from the included page whereas tag file attributes have page scope so wont be available outside the included page.But in the topic on jsp:include it says parameters send to include are not available outside the included page.Which is right?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New parameters that you pass to include/forward will not be accessible outside those tags.
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then I guess this should be added to errata of HFSJ?Also then whats the difference between attributes to tags and params to include?
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Santou,Please help me in this
 
Aniket Patil
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
attributes send to jsp:include using jsp : param are request parameters and and can be accessed when we are back from the included page


Where did you find this on Page 494?
 
shivender Devarakonda
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are wrong. It was clearly said that <<jsp : param >> is used to set the parameters in request. so it should be available after include tag also. Please check HFSJ 415 include review...... it says that you can re-set a parameter value that is already there in the request so it clearly says it operates directly on request object. I, my self never used extensively this feature
any comments???
-Shivender
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's when I have no choice but pull out the spec :

When doing jsp:include or jsp:forward, the included page or forwarded page will see the original request object, with the original parameters augmented with the new parameters, with new values taking precedence over existing values when applicable. The scope of the new parameters is the jsp:include or jsp:forward call; i.e. in the case of an jsp:include the new parameters (and values) will not apply after the include. This is the same behavior as in the ServletRequest include and forward methods (see Section 8.1.1 in the Servlet 2.4 specification).
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Santou,
Then wahts the difference between attributes to tags and params to include?This is the advantage mentioned for attributes to tags in HFSJ
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please help me with this?
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Santou,
Could you please help me in this?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then wahts the difference between attributes to tags and params to include?

Attributes : the tag itself will receive the values.
Params : the page included will receive the values.
Sorry, I don't understand what is bothering you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic