tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Rubdi" <rashmi....@gmail.com>
Subject Re: Bug
Date Sun, 29 Apr 2007 17:33:18 GMT
Hi Venu,

I was able to solve this error, please see the explanation below.

I too got this error:

org.apache.jasper.JasperException: /p/datagrid/index.jsp(475,0)
According to TLD or attribute directive in tag file, attribute items
does not accept any expressions

when I tried example1.jsp from the datagrid-examples.war that is
contained within:
jakarta-taglibs-sandbox-datagrid-20060829 which was obtained from here:
http://people.apache.org/builds/jakarta-taglibs-sandbox/nightly/projects/datagrid/
I suppose the above is the ~latest~ available version of DataGrid.

I was able to solve this error by using a Servlet 2.2 DTD in my web.xml.
I guess DataGrid is not compatible with Servlet 2.4.

Following is the web.xml structure that got it to work:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN"
        "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>

    <taglib>
        <taglib-uri>http://jakarta.apache.org/taglibs/datagrid-1.0</taglib-uri>
        <taglib-location>/WEB-INF/tld/taglibs-datagrid.tld</taglib-location>
    </taglib>

</web-app>

In order to try the above, please back up your current web.xml and
create a new web.xml exactly as shown above, provided that you placed
the tld file in this location: Project
/WEB-INF/tld/taglibs-datagrid.tld

example1.jsp is something like this:
<%@ taglib uri="http://jakarta.apache.org/taglibs/datagrid-1.0" prefix="ui" %>
<ui:dataGrid items="${employees}" var="employee" name="datagrid1"
cellPadding="1" cellSpacing="0">

</ui:dataGrid>

I was able to see the DataGrid after making changes to the web.xml as
indicated above.

-Regards
Rashmi

---------------------------------------------------------------------
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