tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject RE: "Attribute select has no value" error
Date Sun, 08 Feb 2004 17:20:02 GMT
Assuming you really did copy this directly from your code, the answer is
clear right here:

<sql:query var="articles" dataSource="${dataSource}"
select * from Articles>
</sql:query>

You didn't close the "sql:query" tag with a ">" character, but the
"select" line ends with one.  Thus, the JSP compiler would think that
"select" is an attribute", but you gave it no value.

Move the ">" at the end of the "select" line and move it to the end of
the first line.

-----Original Message-----
From: Moazam Raja [mailto:moazam@unixville.com] 
Sent: Sunday, February 08, 2004 1:26 AM
To: taglibs-user@jakarta.apache.org
Subject: "Attribute select has no value" error


Hi all, I'm having a very frustrating problem which is probably very 
simple to solve.

I downloaded the jakarta-taglibs-standard-1.0.5 and have installed it 
(the standard.jar file) into my webapps WEB-INF/lib area. I'm using 
Tomcat 4.1.29.

I have a JSP page which is trying to connect to a JDBC mySQL database 
but I keep getting this error when I try to compile:

------------------------------------------------
articles.jsp [19:7] Attribute select has no value
Errors compiling articles.
------------------------------------------------

Here is my source code:

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

<sql:setDataSource dataSource="dataSource" 
driver="org.gjt.mm.mysql.Driver" url="jdbc:mysql://localhost/moazam" 
user="user" password="pass" />

<c:set var="browser" value="${header['User-Agent']}"/>
<c:out value="${browser}"/>
<br><br>

<sql:query var="articles" dataSource="${dataSource}"
select * from Articles>
</sql:query>

<table>
<c:forEach var="row" items="${articles.row}">
    <tr>
    <td><c:out value="${articles.ID}" /></td>
    <td><c:out value="${articles.Author}" /></td>
    <td><c:out value="${articles.Title}" /></td>
    <td><c:out value="${articles.Topic}" /></td>
    </tr>
</c:forEach>

</table>


Now...the error refers to [19:7] and line 19 is:

select * from Articles

I know that my taglib is setup correctly because if I comment out all 
the SQL stuff, the Core taglib which outputs the user-agent works fine.

I've searched with Google for this error and can not find anything...

Any ideas?

Thanks.

-Moazam


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message