Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

According to TLD or attribute directive in tag file, attribute items does not accept any expressions  RSS feed

Nagaraju Yanamala
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to TLD or attribute directive in tag file, attribute items does not accept any expressions

I run this code in eclipse, but i got some error like this According to TLD or attribute directive in tag file, attribute items does not accept any expressions

please any one correct this code.

<%@ page contentType="text/html"%>
<%@ page import="java.util.*"%>
<%@ page import="org.apache.taglibs.datagrid.DataGridParameters"%>
<%@ page import="java.sql.*"%>
<%@ page import="emp.*"%>
<%@ taglib uri="" prefix="ui" %>
<%@ taglib uri="" prefix="c" %>
<%@ taglib uri="" prefix="fmt" %>

<title>jsp paging example in datagrid</title>
th a:link { text-decoration: none; color: black }
th a:visited { text-decoration: none; color: black }
.rows { background-color: white }
.hiliterows { background-color: pink; color: #000000; font-weight: bold }
.alternaterows { background-color: #efefef }
.header { background-color: cyan; color: #000000;font-weight: bold }

.datagrid { border: 1px solid #C7C5B2; font-family: arial; font-size: 9pt;
font-weight: normal }

<span align="center" style="padding-left:250px;font-size:20px;">THE USER DEATAILS ARE</span><BR><BR>
<% ArrayList empList = new ArrayList ();
Employee empObj;
int fromIndex, toIndex;
int tcount =0;
int perpage=4;
int tpage=0;
try {

Connection connection = null;
Statement statement = null;
ResultSet rs = null;

connection =DriverManager.getConnection("jdbc:oracle:thin:@","ICDTEST","CmtIcdTest");
System.out.println("the connection is established............");
System.out.println("the connection is not established............");

statement = connection.createStatement();
rs = statement.executeQuery("SELECT * from CMT_USER_ACCOUNT2");
while ( {
empObj= new Employee ();

// System.out.println("all values is inserted...........");


catch (Exception ex) {
System.out.println("Unable to connect to batabase."+ex);
fromIndex = (int) DataGridParameters.getDataGridPageIndex (request, "datagrid1");
if ((toIndex = fromIndex+4) >= empList.size ())
toIndex = empList.size();
request.setAttribute ("empList", empList.subList(fromIndex, toIndex));

pageContext.setAttribute("tCount", tcount);

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<ui:dataGrid items="${empList}" var="employee" name="datagrid1" cellPadding="0"
cellSpacing="0" styleClass="datagrid" >

<column width="400">
<header value="LOGIN_ID " hAlign="left" styleClass="header"/>
<item value="${}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="First_Name " hAlign="left" styleClass="header"/>
<item value="${} ${employee.lname}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="Last_Name" hAlign="left" styleClass="header"/>
<item value="${employee.lname}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="Password" hAlign="left" styleClass="header"/>
<item value="${employee.password}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="Password_Hint" hAlign="left" styleClass="header"/>
<item value="${employee.passwordhint}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="Password_Hint_Ans" hAlign="left" styleClass="header"/>
<item value="${employee.passwordhintans}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="Created_Date" hAlign="left" styleClass="header"/>
<item value="${employee.doj}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="ROLE" hAlign="left" styleClass="header"/>
<item value="${employee.role}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="CREATE_BY" hAlign="left" styleClass="header"/>
<item value="${employee.createby}" hAlign="left" styleClass="item"/>

<column width="400">
<header value="E_MAIL" hAlign="left" styleClass="header"/>
<item value="${}" hAlign="left" styleClass="item"/>


<rows styleClass="rows" hiliteStyleClass="hiliterows"/>
<alternateRows styleClass="alternaterows"/>

<paging size="4" count="${tCount}" custom="true" nextUrlVar="next"
previousUrlVar="previous" pagesVar="pages"/>
<order imgAsc="up.gif" imgDesc="down.gif"/>
<table width="750" style="font-family: arial; font-size: 10pt" border=0>

<td align="left" width="33%">
<c:if test="${previous != null}">
<a href="<c:out value="${previous}"/>">Previous</a>
<td align="center" width="33%">
<c:forEach items="${pages}" var="page">
<c:when test="${page.current}">
<b><a href="<c:out value="${page.url}"/>"><c:out value="${page.index}"/></a></b>
<a href="<c:out value="${page.url}"/>"><c:out value="${page.index}"/></a>
<td align="right" width="33%"> 
<c:if test="${next != null}">
<a href="<c:out value="${next}"/>">Next</a>

Stefan Evans
Posts: 1836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change this:

to this:

The subtle addition of /jsp into the mix tells it to use JSTL1.1 rather than JSTL1.0
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!