- This topic has 8 replies, 6 voices, and was last updated 20 years ago by Riyad Kalla.
-
AuthorPosts
-
Vance FellersMemberFirst, I have had this problem from before V3.8.1.
When I use JSTL in my JSP I get the following error:
“According to TLD or attribute directive in tag file, attribute value does not accept any expressions”
The JSTL I am using is:
<c:out value=’${CustomerForm.firstName}’ />I realise that in the c.tld file for JSTL that the tag with the name of out, with attribute named value has its rtexprvalue set to false. I would have thought that it should be recognized that I am using a JSTL-EL expression and not a JSP expression – therefore I should not be receiving any errors.
Thank you
Scott AndersonParticipantnvfellers,
This problem was fixed in one of the quickfixes to 3.8.1. The download and installation instructions for the fix are located here:
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-3517.htmlOnce you install the fix and verify that it installed correctly (see instructions) you should be able to revalidate your project to remove the errors.
jhbowlingMemberI just installed version 3.8.2 (build id 200408201200-3.8.2) and I’m getting “According to TLD or attribute directive in tag file, attribute value does not accept any expressions”.
skabossMemberI have exactly the same problem, using version 3.8.2 too…
Did you find a solution ?
Riyad KallaMemberjhbowling & skaboss:
1) If you do need to use expessions (<%= blarg %>) then you need to use the rt JSTL tags (c-rt, for example)
2) Make sure your web.xml description is using the web 2.4 specification so the expressions will be evaulated and not ignored.
skabossMemberThanks a lot Riyad
With your help and the tips given by you in this thread, I solved my problem 🙂
Riyad KallaMemberMerry Christmas!
Luke FernandezMemberI changed:
<%@ taglib prefix=”c” uri=”/WEB-INF/c.tld” %>
to:
<%@ taglib prefix=”c” uri=”/WEB-INF/c-rt.tld” %>And now jsp code like the following works:
<c:when test=”${roleVar == ‘admin’}”>
Why the change, and when did it happen?
Riyad KallaMemberlfernandez,
With JSTL 1.0 there were two version of the tablibs, 1 was plain c.tld and 1 accepted runtime expressions (c-rt.tld). If you upgrade to JSTL 1.1, the tags now accept both, so you only need c.tld, f.tld, etc. -
AuthorPosts