facebook

JSTL expression evaluation error

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #213993 Reply

    First, 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

    #214013 Reply

    Scott Anderson
    Participant

    nvfellers,

    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.html

    Once you install the fix and verify that it installed correctly (see instructions) you should be able to revalidate your project to remove the errors.

    #220329 Reply

    jhbowling
    Member

    I 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”.

    #220596 Reply

    skaboss
    Member

    I have exactly the same problem, using version 3.8.2 too…
    Did you find a solution ?

    #220601 Reply

    Riyad Kalla
    Member

    jhbowling & 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.

    #220704 Reply

    skaboss
    Member

    Thanks a lot Riyad

    With your help and the tips given by you in this thread, I solved my problem 🙂

    #220708 Reply

    Riyad Kalla
    Member

    Merry Christmas!

    #220832 Reply

    I 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?

    #220834 Reply

    Riyad Kalla
    Member

    lfernandez,
    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.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: JSTL expression evaluation error

You must be logged in to post in the forum log in