This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I have one listbox( in form ) with multiple selection option. upon clicking submit button this form will send details to servlet program. The problem here for me is , whichever is selected in listbox, that only am getting in servlet side.
Is it possible to get all the values from list box even without single selection.
<FORM NAME="test" ACTION="/servlet/test" METHOD="POST"> .... <select size="8" name="list" multiple> <option>Test One </option> <option>Test Two </option> </select> ....... </form>
<select> elements will, by their definition, only send the values of selected option elements as part of a form submission. If you want all the option values sent, you can either: select them under script control when the form is submitted, or you can copy all the option values to hidden elements that will be submitted.