• Post Reply Bookmark Topic Watch Topic
  • New Topic

pass request attribute through url to the welcome.jsp and action.

 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I need to pass an attribute in the url like this....

"http://localhost/hello?user=john"

and hello is configured in web.xml to go the welcome.jsp....

how to retrieve the variable "user" in welcome.jsp in a scriptlet... thanks in advance for help...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Robin John:
I need to pass an attribute in the url like this...

The correct term is parameter; "attribute has other (multiple) meanings.

how to retrieve the variable "user" in welcome.jsp in a scriptlet...
Well, you shouldn't be using out-dated scriptlets, and you shouldn't be processing data in a JSP, but...

To obtain the parameter with the EL:and with Java code in a scriptlet:
 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Bear, was in a bit hurry.. next time.. i will take care of the terms i use... after all its javaranch thanks again for the answer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!