Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:16 Go to next message
Biji Simon is currently offline Biji SimonFriend
Messages: 6
Registered: May 2015
Junior Member
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 18:40 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

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.


_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Tue, 12 May 2015 18:41]

Report message to a moderator

Re: Programming using jsp and servlet [message #1695336 is a reply to message #1695220] Wed, 13 May 2015 14:18 Go to previous message
Biji Simon is currently offline Biji SimonFriend
Messages: 6
Registered: May 2015
Junior Member
Sir,Thank u for your help....
Previous Topic:Eclipse
Next Topic:Eclipse Android R.java cannot be resolved!
Goto Forum:
  


Current Time: Fri Mar 29 12:43:23 GMT 2024

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

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

Back to the top