I’m experiencing the inconsistent appearance of the dreaded “According to the TLD or attribute directive in tagfile, attribute value does not accept any expressions” error in JSTL tags in my J2EE 1.3 / JSTL 1.0 MyEclipse projects. I’ve been working to get to the bottom of it, and presently have created two identical, simple MyEclipse Web Apps, one of which exhibits the error for any EL expression in a tag attribute and the other which does not. Both apps work correctly in WLS 8.1 (JSP 1.2 container.)
Both apps were created using MyEclipse 3.8.4+QF2’s Web Application wizard under specifying J2EE 1.3 and JSTL 1.0 support. I’m using Eclipse 3.0.1. Each project has only a single JSP under WebRoot, the body of which was borrowed from http://java.sun.com/developer/technicalArticles/javaserverpages/faster/, and looks like this:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
<head>
<title>Simple Example</title>
</head>
<body>
<c:set var="browser" value="${header['User-Agent']}"/>
<c:out value="${browser}"/>
</body>
</html>
The error message appears on the first <c:set> tag. In my experimentation, I’ve experienced it sometimes when creating the first JSP in a project (upon file save), and other times it takes a while to appear. So far I’ve been unsuccessful in finding a particular stimulant.
Both project trees were demonstrated identical using BeyondCompare doing binary comparison of the files. Only files .project and .metadata differ, and these only differ in the project name fields.
I’ve been reading on the matter of JSTL 1.0 EL support and am finding some conflicting information. Several pundits say that there is no EL support in JSTL 1.0 other than “RT” style. Confusingly, this seems to contradit the JSTL 1.0 spec and examples. I read these to say that there is EL support within tag attributes (though not for EL outside of tag attributes, which seems to make sense since JSP 1.2 knows nothing of EL.)
Any help on this would be really appreciated.
Thanks,
-Joe