• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP

 
Rajesh KG
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a foam using JSP. How can I display values, which is selected from the database, in the listbox using <option value selected>value</option>
 
Rakesh Gadre
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try this syntax:
<html>
<form>
<select name="myname">
<%
while(rs.next())
{
%>
<option value="<%=rs.getString(1)%>"><%=rs.getString(1)%>
<%
}
%>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic