This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes request.getParameterValues() for radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "request.getParameterValues() for radio buttons" Watch "request.getParameterValues() for radio buttons" New topic

request.getParameterValues() for radio buttons

Jeff Dube
Ranch Hand

Joined: Jun 14, 2001
Posts: 44
I work with a form and I want to display a table which indicates the choices made by the user. I must check check boxes and radio buttons. The following method functions well for the text area:
<td align="right">
<td align="left">
But i nee to do the same with the radio buton and check boxes.
Can somebody help me?
Alag Solai

Joined: Jun 26, 2001
Posts: 3
on the client side create all check box and radio button INPUT html tags with same name.
Then you can use request.getParameter(valueofNameattribute) for Radio button and request.getParameterValues(valueofNameattribute) for checkboxes.
request.getParameterValues returns array of strings, so you can look through to find out the options selected by the user.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: request.getParameterValues() for radio buttons
It's not a secret anymore!