GeeCON Prague 2014*
The moose likes JSP and the fly likes Retrieve values from JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retrieve values from JSP