Re: Bug

"Rashmi Rubdi" <[email protected]>
Newsgroups gmane.comp.jakarta.taglibs.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.