Two Laptop Bag*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tomcat 5.0.16 SQL JSLT not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tomcat 5.0.16 SQL JSLT not working" Watch "Tomcat 5.0.16 SQL JSLT not working" New topic
Author

Tomcat 5.0.16 SQL JSLT not working

sun ram
Ranch Hand

Joined: Dec 18, 2001
Posts: 61
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


SCSecA,SCNA,SCSA,SCWCD,SCJP
hover cheng
Ranch Hand

Joined: Feb 11, 2003
Posts: 66
Sorry to bother... I just want to make sure that jstl sql tags are NOT one of the scwcd beta objectives, am i right?


SCJP 91% SCJD 94% SCBCD 98% SCWCD1.4 86%<p>XML141 SCDWJS -- in progress<br />If you don't retreat, you are mostly among those who can surmount it.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
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....


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 5.0.16 SQL JSLT not working