I want to pass the value of name
to text as combobox. I am getting value of name
from database.
{
String name=resultset.getString(1);
}
Thanks.
I want to pass the value of name
to text as combobox. I am getting value of name
from database.
{
String name=resultset.getString(1);
}
Thanks.
Here is Why you should use JSTL than JSP scriptlets. You should start use JSTL
.
I've given you the scriptlet code here. You can iterate the resultset between select tag
and set values for option.
<select name="username">
<% while(resultset.next()){ %>
<option value="<%=resultset.getString(1)%>"><%=resultset.getString(1)%></option>
<% } %>
</select>