getting value from drop down list in JSP
How can I get a value of a drop开发者_Python百科 down list in JSP and store it through session?
HTML
Note: note here name attribute of combobox is specified
<select name="comboOne" >
<option>Small0</option>
<option>Small1</option>
<option>Small2</option>
</select>
<input type="submit"/>
</form>
JSP / SERVLET
request.getParameter("comboOne");//this will return selected value
I would suggest to go for JSTL approch.
精彩评论