aspose file tools*
The moose likes Servlets and the fly likes parameter to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "parameter to servlet" Watch "parameter to servlet" New topic
Author

parameter to servlet

yoop
Greenhorn

Joined: May 05, 2001
Posts: 3
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");
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Put it in your doGet or doPost...it depends on your processing needs. String a=request.getParameter("x")

Bosun

Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
yoop
Greenhorn

Joined: May 05, 2001
Posts: 3
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

ninad parkhi
Greenhorn

Joined: May 04, 2001
Posts: 25
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

Maky Chopra
Ranch Hand

Joined: Apr 11, 2001
Posts: 149
yoop,
The javaranch has a naming policy and your login name does not meet the requirement.
Please signup again with a proper name.
Thanks..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: parameter to servlet