• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Drop Down box for Jstl Select query results

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a jsp page and inside it I have a Select query which gets results for a table. I want to show that results as drop down box on a jsp page.

How to get the results into drop down box on a jsp page.

Any ideas.

Thanks

SP Nam
 
SP Nam
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
This is my code,
any body look in and suggest
SP Name

----------------

<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<html>
<head>
<title>JSTL: SQL action examples</title>
</head>
<body bgcolor="#FFFFFF">

<h1>SQL Update Exec</h1>

<sql:setDataSource

var="example"
driver="oracle.jdbc.driver.OracleDriver"
url="jdbc racle:thin:@insn104a.idc.oracle.com:1522 ra9idb"
user="scott"
password="tiger"
/>

<sql:transaction dataSource="${example}">

<sql:query var="abc">
select emp_id from emp
</sql:query>

</sql:transaction>



<p>Select a Class
<select Name ="ClassDrop">
<c:forEach var="row" items="${abc.rows}">
<option><c ut value="${row.emp_id}" /></option>
</c:forEach>
</select>
<p>

<input type="submit" value="SUBMIT"/>
<input type="reset" value="RESET"/>
</body>
</html>
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic