File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JSTL SQL tag related ..issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL SQL tag related ..issue" Watch "JSTL SQL tag related ..issue" New topic
Author

JSTL SQL tag related ..issue

Rajibul Alam
Greenhorn

Joined: Jul 01, 2009
Posts: 13
I am trying to do the following but its giving me error saying that sql doesnt have any query to execute. I print out the sqlQuery sting and it prints it out properly but sql="${sqlQuery}" portion of the code doesnt work. Can anyone please tell me why?
<%
String sqlQuery = sqlQueryBean.getQuery();
%>
<h2><%=sqlQuery%>
<sql:setDataSource dataSource="jdbc/_Obweo" />
<sql:query var="selectedRows"
sql="${sqlQuery}">

</sql:query>
<Select name="SysUserID">
<c:forEach var="currentRow" items="${selectedRows.rows}">
<option <c: out value="${currentRow.SystemuserID}" />>
<c: out value="${currentRow.first}" /> <c: out value="${currentRow.last}" />
</option>
</c:forEach>
</select>


Thanks in Advance
Rajibul Alam
Greenhorn

Joined: Jul 01, 2009
Posts: 13
javax.servlet.ServletException: javax.servlet.jsp.JspTagException: No SQL statement specified

root cause

javax.servlet.jsp.JspTagException: No SQL statement specified

is the Error that I get
Rajibul Alam
Greenhorn

Joined: Jul 01, 2009
Posts: 13
Figured out the solution....maybe it will help someone else someday

<c:set var="qry" value="${Query}" />

<sql:setDataSource dataSource="jdbc/_Obweo" />
<sql:query var="selectedRows" scope="application"
sql="${qry}">

</sql:query>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL SQL tag related ..issue