Skip to content Skip to sidebar Skip to footer

Accessing Selected Dropdown Items Using Java

I have a dropdown which consist the language names. I am setting the value and displaying name of the dropdown by using a hashmap.

Solution 1:

update your jsp likewise,

<form...>
...
<inputtype="hidden"name="code"value = <%= name%>/> 
....
</form>

then get it from your servlet likewise,

 request.getParameter("code"); // will return value of code

NOTE :

Remove from your jsp-code if above solution you gonna implement then,

 request.setAttribute("code", name);

Post a Comment for "Accessing Selected Dropdown Items Using Java"