aspose file tools
The moose likes JSP and the fly likes Retrieve values from JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Retrieve values from JSP" Watch "Retrieve values from JSP" New topic
Author

Retrieve values from JSP

Hans Thiel
Greenhorn

Joined: Nov 26, 2007
Posts: 1
Hello!

I have the following forEach loop in my JSP:


Because the names of the checkbox and radios are generated dynamically (loopStatus), the operations:

simply won't go. How can I retrieve values from selected checkbox and radio buttons with loopStatus in my form controller (onSubmit) using the request object? Any ideas?

Cheers
Hans
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15229

If you want all your radio buttons to be part of the same group their names must all be the same. So you shouldn't be indexing them like you are. I'm not sure why you think you need to do that but just remove the [] indexes from the names.

Also, I am moving this to the JSP forum.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Retrieve values from JSP
 
Similar Threads
Struts2: I want to use <s:textfield> inside <s:checkbox>, is it possible?
how to do Multiple checkbox binding in spring
control the width of the fieldset
printing index of an collection in JSP using JSTL
Radio Select and Other