File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP

 
Rajesh KG
Greenhorn
Posts: 2
  • 0
  • 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
  • 0
  • 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)%>
<%
}
%>
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic