wood burning stoves 2.0*
The moose likes Servlets and the fly likes getting form data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getting form data" Watch "getting form data" New topic

getting form data

eric clark

Joined: Jan 18, 2001
Posts: 16
mornin all, im just trying to find some way to collect all data from a field of radiobuttons on a jsp site, to write it back in a database..what i got btw is this:
String paraname = "";
for (Enumeration selectedValues = request.getParameterNames();selectedValues.hasMoreElements(); ) {
paraname = selectedValues.nextElement().toString();
problem is that it doesnt werk prolly some1 sees a solution?
[This message has been edited by eric clark (edited January 18, 2001).]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
For radio buttons, the "name" is the name of the group - there will be only one parameter for any radio button group so don't use request.getParameterValues(paraname)
use getParameter( paraname );
eric clark

Joined: Jan 18, 2001
Posts: 16
thanx, it works now
greets eric
I agree. Here's the link: http://aspose.com/file-tools
subject: getting form data
Similar Threads
how to get values from session in servlet
Who is your favorite newsreader?
jsp vs asp forms big problem
Processing Radio Buttons in a Form/Servlet
Core J2EE Patterns - Value List Handler (valuelist.sf.net)