• Post Reply Bookmark Topic Watch Topic
  • New Topic

request getAttribute getParameter  RSS feed

 
FY Hsieh
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I passed a paramer name value by doing

http://.../Hello.action?v1=value1&v2=value2

In the action class I found I can get

v1's value by

request.getAttribute("v1").toString();

I thought I can only get this value by

request.getParameter("v1")

because it is passed by parameter in URL. Why can I get it from

getAttribute as well ?

I never set it in

request.setAttribute() ...

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. Something is setting it up as a scoped attribute somewhere.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!