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:[EMAIL PROTECTED] 
Sent: Sunday, February 08, 2004 1:26 AM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to