aspose file tools*
The moose likes Servlets and the fly likes form inputs in servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "form inputs in servlets" Watch "form inputs in servlets" New topic
Author

form inputs in servlets

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
how do i get html form inputs radiobutton group in servlets
Sean MacLean
author
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
Do you mean how do you get the selected value? If so, then you simply call getParameter() for the name of the radiogroup. For instance,
<HTML><FORM METHOD=POST ACTION="Some url">
<INPUT TYPE=CHECKBOX NAME=radios VALUE="box1">
<INPUT TYPE=CHECKBOX NAME=radios VALUE="box2">
<INPUT TYPE=CHECKBOX NAME=radios VALUE="box3">
</FORM>
</HTML>
Now, you simple call getParameter("radios") in the servlet and the value that will be returned will be the value associated with the radio that the user selected. I hope this helps.
Sean
arpit singla
Ranch Hand

Joined: Jun 18, 2001
Posts: 66
if user selects multiple checkboxes, then how to pass those multiple values to servlet ?
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
if user selects multiple checkboxes, then how to pass those multiple values to servlet ?


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: form inputs in servlets
 
Similar Threads
jsp parameters pass more than one value to the handler
Hourly rate for Java Consultant
How many servlets should I use?
How to close a child window through the servlet?
How to pass a javascript variable on a jsp to a servlet