• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

get the radio button value in three differnt jsp

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hiii..
i hv some radio buttons on my jsp page ... say "jsp parent"
i want three buttons on "jsp parent" .each button would lead you to a different jsp page ...

suppose first button would forward the user to "jsp1" second on "jsp2" and third on "jsp3"....
i want to get the selected radio button value ..
when i click on first button i should get the select radio button value on "jsp1" and when i click second button i want selected radio button value on "jsp2"...
please help
 
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can set the value in request or session variables and access through out the request or session.
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

deepakkk gupta wrote:hiii..
i hv some radio buttons on my jsp page ...



Please use real words when posting to the forums. Abbreviations such as "hv" in place of "have" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
deepakkk gupta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ruquia tabassum wrote:You can set the value in request or session variables and access through out the request or session.


i need two parameters to set the attribute in session or request first one is string and second which i want to store in that...
but problem is that how can i get the the selected radio button in the second parameter of setAttribute...

and remember these all thing should be done in "jsp parent" page because on any click i have to go differnt page and retrieve the value from the session there.
 
carina caoor
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On click of radio button you are calling a JSP in the JSP itself set the value in the session variable. For example if the radio button1 has the value Testjava button2 has value TestServlet and on click of button1 you are calling TestJava.jsp and on click of button2 you are calling TestServlet.jsp then in TestJava.jsp itself set the value of radio button in the variable as:-

session.setAttribut("button1Value","java");


Also for clear understanding of the issue its always better to post code .
 
Bear Bibeault
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"deepakkk gupta",please check your private messages for an important administrative matter.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic