Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

request.getAttribute and request.getParameter

 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that even though I explicitly equate the attribute to null in a forwarded jsp page (which will forward itself again to the calling page later); the calling page still has access to the parameters sent to it via a form.
Attribute names @ request scope and the parameter names (which are naturally in the request scope) refer not to the same thing actually ??
It is confusing...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parameters and attributes are completely separate items.
Parameters are generated by submission parameters (be they form elements or query string parameters), while attributes are placed onto a request under code control. They really have not a thing to do with each other.
bear
 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ja Bear,
thx, I thought they were the same since both reside on the request scope; and did a small design on this a priori assumption; on which some request parameters wander around strangely.
But handled them appropriately after your post. Created a new req. attribute and check it afterwards in the forwarded pages.
Merci,
B. Baran
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic