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?