What I am trying for this is
on selection of dropdown value, i am calling javascript function and pass selected value of dropdown as parameter. Inside javascript function I have written scriptlet to do hashmap.get();
Remember a jsp page is translated to a servlet before producing an html page that is displayed at the client side. So your
java code(which is executed first) that you have put in the javascript function will no longer be there after the html page is rendered. If in your dropdown list the actual value of any option element is equal to its corresponding displayed value, i see no need of doing further work. But if these two values are not the same, eg:
<option value="key">value</option> where key is different from value, then you can append the value to the key using a separator so that in your javascript function you can easily break the actual value of your select element value and retrieve the displayed value. Eg: using "_" as seperator, you will have
..<option value="key_value">value</option>
Hope that will help.