retrieve checkboxgroup value in jsp

Posted on 2003-02-26
Medium Priority
Last Modified: 2008-03-10
How to retrieve checkboxgroup values sent from one jsp page say <input type="checkbox" name="cbquicklist"> to another jsp page. I have used a group of checkboxes with the same name ="cbquicklist" if i use request.getParameter("cbquicklist"); It returns only the first checkbox value.
Question by:r_muthu
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

Malpheus earned 200 total points
ID: 8031964
Did you try request.getParameterValues("cbquicklist")? Function returns a String[].

Expert Comment

ID: 8036182
Don't forget that the browser will only include name/value pair for a checkbox in the response if it's checked.
LVL 53

Expert Comment

ID: 9350308
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

If the user does not know how to close the question, the options are here:



Expert Comment

ID: 9364430
I think Malpheus's answer was correct, since using getParameterValue() will only return the first value from the HTTP request; his suggestion should have worked, even though r_muthu never indicated whether or not it did.  My point was extremely important, though, in that it is necessary to note that only checked checkboxes return a value; if you don't keep this in mind when writing your code, you may forget to use "false" for any checkbox on the form that didn't return a value.

I think Malpheus deserves most of the credit, and an A, since his answer was absolutely correct to the question that was asked.  I think I deserve an assist, since my point was one that is often overlooked.

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question