This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat 5.0.16 SQL JSLT not working

 
sun ram
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am trying to use SQL JSLT tag. When I access the JSP I am getting un-processed JSP page.
Here is my orginal JSP File:

<sql:setDataSource
var="shopDb" scope="session" driver="org.gjt.mm.mysql.Driver" url="jdbc:mysql://192.168.1.31:3306/ptceDB" user="xxxx" password="xxx"/>
<sql:query var="userList" scope="request" dataSource = "${shopDb}">
SELECT * FROM roomtable

</sql:query>

<c:choose>
<c:when test = "${userList.rowCount ==0}">
Sorry, there are no customers on the
</c:when>
<c therwise>
Here is the list of customers
<br>
<table border="1">
<th>User name</th>
<th>Address</th>
<c:forEach items="${userList.rows}" var="row">
<tr>
<td><c ut value="${row.Roomno}" /></td>
<td><c ut value="${row.Name}" /></td>
</tr>
</c:forEach>
</table>
</c therwise>
</c:choose>

This is what I am getting in my browser:
( view source ouput)

<sql:setDataSource
var="shopDb" scope="session" driver="org.gjt.mm.mysql.Driver" url="jdbc:mysql://192.168.1.31:3306/ptceDB" user="xxx" password="xxx"/>
<sql:query var="userList" scope="request" dataSource = "">
SELECT * FROM roomtable

</sql:query>

<c:choose>
<c:when test = "false">
Sorry, there are no customers on the
</c:when>
<c therwise>
Here is the list of customers
<br>
<table border="1">
<th>User name</th>
<th>Address</th>
<c:forEach items="" var="row">
<tr>
<td><c ut value="" /></td>
<td><c ut value="" /></td>
</tr>
</c:forEach>
</table>
</c therwise>
</c:choose>
any help to fix this problem?
SR
 
hover cheng
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry to bother... I just want to make sure that jstl sql tags are NOT one of the scwcd beta objectives, am i right?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by hover cheng:
Sorry to bother... I just want to make sure that jstl sql tags are NOT one of the scwcd beta objectives, am i right?

Exactly right! Only "core" tags are in....
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic