File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jstl and View data problem

 
hassan ali
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i am new in JSTL i have follow example in JSTL package but i can insert into DB but when try to retrive data i got empty Table
i am using jakarta-taglibs-standard-1.1.2

this my page
<sql:setDataSource var="example" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/test" user="root" password="123456"/>

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


<sql:update var="update">
INSERT INTO user (email,password)VALUES ('sdasd@sdasd','asdsdasd')
</sql:update>


<sql:query var="deejays">
SELECT * FROM user
</sql:query>

</sql:transaction>

///////////////////////////////this view nothing
<table>
<c:forEach var="Row" begin="0" items="${deejays.rowsByIndex}">

<td> <cut value="${deejays.rowsByIndex[0][0]}" /></td>

</c:forEach>

</table

</body>
</html>
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic