• Post Reply Bookmark Topic Watch Topic
  • New Topic

extracting values  RSS feed

 
dale con
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all

I have a url www.domain.com/myscript.jsp?username=me&amount=200

can someone tell me how i get the username and amount values from the url?

thanks for your help
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume you mean from within a JSP ?

If you are using the JSTL (you should), the request parameters are available via the param implicit scoped variable.

If you are embedding scriplets in the JSP (not so recommended), the getParameter() method of the request implicit scripting variable can be used.

You should work through a JSP tutorial.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!