Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Pulling parameters out of the URL  RSS feed

 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a simple question for you. Not quite sure how to pull parameters out of the URL? Here's the catch.. I need to pull the parameters out within the JSP page. I'm posting the JSP page to itself and it needs to pick up the parameters from the previous call. Any help out there?

Dale

------------------
By failing to prepare, you are preparing to fail.
Benjamin Franklin (1706 - 1790)
[This message has been edited by Dale DeMott (edited August 10, 2001).]
 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the .jsp you can get the URL parameters through the implicit request object. Just refer to its name in the url line. So if you have a url of:
http://www.someplace.com?param1=something
then in the .jsp, just user:
String parm = request.getParameter("param1");
HTH
Brian
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! I'll try that!
Dale
------------------
By failing to prepare, you are preparing to fail.
Benjamin Franklin (1706 - 1790)
 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have more than one parameters extends it to the followinghttp://www.someplace.com?param1=something¶m2=something2
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!