Solving “According to TLD or attribute directive in tag file” issue

      

Yesterday while working on one of the old web application that was created in J2EE / JSP which is using JSTL for painting pages, I encountered a wired issue. As I was using JSTL in my JSPs, I had include required jars like standard.jar and jstl.jar with proper version in classpath of my project. Still I was getting this error whenever I tried running JSP:

According to TLD or attribute directive in tag file, attribute value does not accept any expressions.

After digging into the issue and searching through web, finally I got a workaround to solve this issue. The taglib directive we use to include JSTL core in our JSP needs to be modified.

The taglib in my JSP was:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

I changed above to:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

And it worked for me!!!

I dig into standard.jar for any clue and also checked few .tld files in this jar but couldn’t find an explanation for this.
Any idea why this is so?


Facebook  Twitter      Stumbleupon  Delicious
  

Tags: , ,

2 Comments on “Solving “According to TLD or attribute directive in tag file” issue”

  • Amelio wrote on 22 February, 2010, 8:19

    Good article,

    I am using struts2-jquery-plugin-1.8.0 with acegi-security-1.0.7

    Thank you so much

    good bye

  • Viral Patel wrote on 23 February, 2010, 15:50

    @Amelio: Thanks for the comment

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!

Copyright © 2010 ViralPatel.net. All rights reserved.