<input type="hidden" name="selectedValue" value="0"/>
put the above one in just below of your select tag
and do this in your servlet
String selectedValue = `request.getParameter("selectedValue")`
now set the selectedValue into the servlet request
create a JS function in your final jsp
function selectedValue(){
var value =<%=request.getParameter("selectedValue")%>;
if(value !=null)
{
document.f1.slvalue.selectedIndex=value ;
}
}
call the
selectedValue()
function on bodyload of your final jsp page. "
slvalue" is a name of your select tag
Ref.:How to keep Dropdownlist value same after refresh the page[^]