This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP" Watch "JSP" New topic


Rajesh KG

Joined: Feb 24, 2003
Posts: 2
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

Joined: Feb 22, 2003
Posts: 47
You can try this syntax:
<select name="myname">
<option value="<%=rs.getString(1)%>"><%=rs.getString(1)%>
It is sorta covered in the JavaRanch Style Guide.
subject: JSP
Similar Threads
how to change select menu dynamically in a JSP
combo box selection in jsp
getting data from html drop down list to jsp
Null vs empty string