Skip to main content



      Home
Home » Newcomers » Newcomers » Programming using jsp and servlet(Adding values to drop down list)
Programming using jsp and servlet [message #1695212] Tue, 12 May 2015 12:16 Go to next message
Eclipse UserFriend
I want to add values from mysql to a drop downlist in jsp....i tried but only the first row value is inserted...
<select>
<% if (rs.next())
{
%>
<option><%= rs.getString(1)%></option>
<% } %>
</select>





<% }
anyone pls help me...
Re: Programming using jsp and servlet [message #1695220 is a reply to message #1695212] Tue, 12 May 2015 14:40 Go to previous messageGo to next message
Eclipse UserFriend
This is more of a general programming question rather than one to do with Eclipse, so would be better served at places such as javaranch.com or stackoverflow.com .

You are using an if statement instead of some kind of for or while loop--assuming the page language is Java.

[Updated on: Tue, 12 May 2015 14:41] by Moderator

Re: Programming using jsp and servlet [message #1695336 is a reply to message #1695220] Wed, 13 May 2015 10:18 Go to previous message
Eclipse UserFriend
Sir,Thank u for your help....
Previous Topic:Eclipse
Next Topic:Eclipse Android R.java cannot be resolved!
Goto Forum:
  


Current Time: Sat May 17 04:32:06 EDT 2025

Powered by FUDForum. Page generated in 0.07896 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top