[JSTL] According to TLD or attribute directive in tag file, attribute items does not accept any expressions - Digizol6

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Wednesday, March 28, 2007

[JSTL] According to TLD or attribute directive in tag file, attribute items does not accept any expressions

Error Message: According to TLD or attribute directive in tag file, attribute items does not accept any expressions. When working on a J2EE (Java Enterprise Edition) web application with JSTL (JSP Standard Tag Library), this is a pretty common error.

Reason for this error is version incompatibility between JSP, Servlet and JSTL. Matching versions are listed below.
  • JSP 1.2 , Servlet 2.3 , JSTL 1.0
  • JSP 2.0 , Servlet 2.4 , JSTL 1.1

Check the web.xml to see whether it uses the Servlet 2.3 DTD or Servlet 2.4 Schema.

If it uses Servlet 2.3 DTD, it will have the following text.
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
.....
</web-app>

For Servlet 2.4 Schema, it will look like below.
<web-app version="2.4" 
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
.....
</web-app>

When you change the versions correctly, no such errors will pop-up. Hope this will help you.

15 comments:

  1. Hi,

    Thanks, I had the same issue and it's solved by changing the Servlet version from 2.4 to 2.3

    ReplyDelete
  2. Timo: I was experiencing the exact same thing, using your change solved my problem

    thank you very much !

    ReplyDelete
  3. Hello,
    Thanks Timo

    ReplyDelete
  4. Thanks @Timo. I had the same problem when using Servlet 3.0 Schema.

    ReplyDelete
  5. Timo thank you. You are solved my problem also :)

    ReplyDelete
  6. Thanks guys, this thread helped me ... much appreciated

    ReplyDelete
  7. Thanks Timo, i faced the same problem After reading this post problem was solved

    ReplyDelete
  8. Thanks Timo, i have faced the same problem After reading your post problem was solved

    ReplyDelete
  9. Thanks Timo, it worked for me too

    ReplyDelete
  10. Thanks Timo!
    It worked for me :)

    ReplyDelete
  11. Hi Timo, I was experiencing the exact same thing, using your change solved my problem

    thank you very much !

    ReplyDelete

Post Top Ad

Responsive Ads Here