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

Some problem passing values

 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody ,

I am having certain problems with passing values between some pages .
So here's the deal ..

I have a main page where i display some list of clients and I have assigned Id's of each the client to a radio button .Now I have to get the value of the selected radio button from the main page to another page which is accessed through the menu ..

Now is it possible to use getParameter() here ..? If not then how ??

Please help me ..

Thank You in advance
 
Harpreet Singh janda
Ranch Hand
Posts: 317
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you submitting the main page to another jsp?
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show your main page?
 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is the code now i have a menu in this page which is imported ... so ....
 
Pradeep Prabhakaran
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, you cant use request.getParameter() ,if you have the page imported in jsp( which contains the menu, as you say).

if you want to use request.getParameter(),
then you ve to append the object that you are passing to the url.
e.g
Alternative-1
Main. jsp




nextpage.jsp


Alternative-2
main.jsp


nextpage.jsp
get the param using request.getParameter()
as mentioned in the above alternative.



The above two alternatives will work. The first alternative can be used anywhere, provided you suffix the
parameter name and its value to the url.

Remember,just because, you have a page imported in your jsp you cannot use "request.getParamter()"
to get the values from the imported page.
 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply and some nice advice

I had to make certain changes at the last changes instead of menu I gave a button in that main page and so i could use those values ..

Thanks anyway
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic