aspose file tools
The moose likes Servlets and the fly likes How can I dynamically read from radio button Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "How can I dynamically read from radio button" Watch "How can I dynamically read from radio button" New topic
Author

How can I dynamically read from radio button

Muyiwa Phillips
Greenhorn

Joined: Mar 08, 2010
Posts: 1
I am developing a survey tool that pulls the questions and Answer options from the database in pure jsp no framework. As the question and answer options is been pulled from DB it dynamically generate radio button that is unique to the question and Answer options.

I will like to know how I can read through the questions and radio button selected and insert the selected answers option into the database.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56229
    
  13

While a JSP can be used to present the questions, the form should be submitted to a servlet not a JSP. JSPs are to present views, not perform data handling and processing.

As such I've moved this to the Servlets forum for any further discussion.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56229
    
  13

In the servlet, the request.getParameter() method can be used to retrieve the information submitted by the HTML form.

There are a few variations, such as request.getParameterMap(), which will retrieve all the submitted values as a Map implementation.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How can I dynamically read from radio button
 
Similar Threads
Radio button value with submit
Dynamic data population from database and display in jsp
Multiple choice SCJP exam?
Render form components with Ajax
JRadioButton