populate pull-down menu

J

jt

I am having problems with loading a pull down menu. I get this error:
javax.servlet.ServletException: No data found.

It will list the items just fine if I list the items without using the
select & option tags. I would like to know why I am getting an error
with the following statement:

<select size="1" name="org">
<% while (rs.next()) { %>
<option value="<%=rs.getString("ORG_CODE")%>">
<%=rs.getString("ORG_CODE")%>
</option> <% } %>
</select>

Thank you.
-jptu
 
T

Tony Morris

jt said:
I am having problems with loading a pull down menu. I get this error:
javax.servlet.ServletException: No data found.

It will list the items just fine if I list the items without using the
select & option tags. I would like to know why I am getting an error
with the following statement:

<select size="1" name="org">
<% while (rs.next()) { %>
<option value="<%=rs.getString("ORG_CODE")%>">
<%=rs.getString("ORG_CODE")%>
</option> <% } %>
</select>

Thank you.
-jptu


EEEEEK!!!
You might want to use a taglib to prevent writing code that is error-prone
(as you have found out), difficult to debug (again, as you have found out),
and difficult to maintain (I'd be swearing at you if I had to maintain that
code).

--
Tony Morris
(BInfTech, Cert 3 I.T.)
Software Engineer
(2003 VTR1000F)
Sun Certified Programmer for the Java 2 Platform (1.4)
Sun Certified Developer for the Java 2 Platform
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top