• 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

parameter to servlet

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in which method shuld i use at the servlet code for request
the value of a radio button in the html code?
html::
<input type=radio name=x value=z>z
<input type=radio name=x value=y>y
java::
String a=request.someMethod("x");
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Put it in your doGet or doPost...it depends on your processing needs. String a=request.getParameter("x")

Bosun
 
yoop
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bosun Bello:
Put it in your doGet or doPost...it depends on your processing needs. String a=request.getParameter("x")

Bosun
thankes bosun
but i know this method and it doesn't help me cause it doesn't get the parameter value it gets the parameter name and on radio buttons you put the same name but different value for each option
and my problem is that i can't get the value


 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi yoop,
Try to us getParameterNames() instead of getParameterValue().
You can store all the values of Radio Button in String array
and later can use them.
I think this will solve your problem
bye
ninad

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yoop,
The javaranch has a naming policy and your login name does not meet the requirement.
Please signup again with a proper name.
Thanks..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic