hi all ...
i have a drop down list in a JSP page that option list from database , when i select one option and then press submit button . the selected value always change to default ( all ) .that i want is : when the user select one option. and then press the query button ,the selected is stay based on the which option choose .Hope some one tell me , what should i do to change my code
this is the code :
<select name="Mylist" ><option value="">All</option>
<%
List listFromServlet = (List)request.getAttribute("list1");
if(listFromServlet !=null)
{
for(int i=0 ; i<listFromServlet.size();i++)
{
objectBean obj =(objectBean) listFromServlet.get(i);
String listOption = Integer.toString(obj.getNamesList());
%>
<option value="<%= listOption %>"><%= listOption%></option>
<%
}
}
%>
</select>