File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting form data

 
eric clark
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();
out.print("|"+paraname+"|");
out.println(request.getParameterValues(paraname));
}
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
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 );
Bill
 
eric clark
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx, it works now
greets eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic