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

Multiple query parameters

 
Kalyan Anand
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP page. On that page I display hyper links. When the user clicks on a hyper link it must pass on parameter besides whatever the URL currently carries. If my current status of url is http://localhost/MyApp/test?teststring=hello and I click on the hyperlink shown on this page it the url must be http://localhost/MyApp/test?teststring=hello&urlstring=testing. which appends the parameter to the existing parameters

If I give the url href parameter as urlstring=testing my url becomes http://localhost/MyApp/test?urlstring=testing and I am losing tghe other parameter. how can i achieve this ?

thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65227
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can't you just create the hyperlink with the proper URL in the first place? What make you wait until after the click to try and append a new parameter to the URL?
 
Kalyan Anand
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application I would not know what all things the end user chooses so it is not a static url for the hyper link. that is the reason why i need to keep on adding all the parameteres the user chooses. any thoughts ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65227
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the value are the result of use interaction with the page? If so, then this is something that must be accomplished with JavaScript; JSP cannot help you.
 
Kalyan Anand
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok so I should gather the request parameters using javascript and when the user clicks on submit the same must be using to place the new request .. correct ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65227
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to do it depends upon when and where you are gather ing the information from and how he request will be initiated.

Shall I move this to the HTML forum, or would you like to start a new topic there with more information provided?
 
Kalyan Anand
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please move it to html.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65227
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Done. Now we need more info.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic