facebook

JSTL attributes not accepting expressions in JSPs (3.8GA)

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

    fineman
    Member

    JSPs using JSTL that were fine in 3.8beta2 and run OK in TomCat 5 now show errors:

    1:<c:forEach var=”user” items=”${users}”>
    2: <c:url value=”/UserDetails.do” var=”userUrl”>
    3: <c:param name=”id” value=”${user.id}”/>
    4: </c:url>
    5: <a href='<c:out value=”${userUrl}”/>’><c:out value=”${user.userName}”/></a>
    6: <br>
    7:</c:forEach>

    line 1, 3, 5 all show errors ‘According to TLD or attribute directive in tag file, attribute <x> does not accept any expressions’ (but these errors do not show in the Eclipse Problems view)

    What operating system and version are you running? Windows 2000
    What Eclipse version and build id are you using? (Help > About Eclipse Platform) 3.0
    – Was Eclipse freshly installed for MyEclipse? 3.8b2 uninstalled first
    – If not, was it upgraded to its current version using the update manager?
    – Are any other external plugins installed? No
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    What MyEclipse version are you using? (Help > About Eclipse Platform > Features) 3.8GA
    What JDK version are you using to run Eclipse? (java -version) 1.4.1_02
    What JDK version are you using to launch your application server? 1.4.1_02
    What steps did you take that resulted in the issue?
    What application server are you using?Tomcat 5

    regards
    Neil Canham
    KnowSense Limited
    Java J2EE WebSphere training and mentoring
    …sense from KnowSense

    #212312 Reply

    Scott Anderson
    Participant

    line 1, 3, 5 all show errors ‘According to TLD or attribute directive in tag file, attribute <x> does not accept any expressions’ (but these errors do not show in the Eclipse Problems view)

    Please check the Problems view’s Filters… settings and ensure that all MyEclipse problem markers are checked.

    Additionally, if you go check the TLD file for the c.tld file, I believe you’ll find that the rtexprvalue is false for the tags for which the error is marked, which is correct. I think you mean to use c-rt.tld for expressions.

    #212318 Reply

    Riyad Kalla
    Member

    Neil,
    As far as the missing errors are concerned click the “down” arrow in the top right of your problems view and go to “Filters…” to adjust the filtering of problems that are displayed from certain editors.

    Also are you using JSTL 1.1? We don’t support it *just* yet but are 95% of the way there and support will eb comming in a maintenence release soon. What was likely happening in Beta 2 is that the Editor was simply ignoring the expressions but with the new editors they are aware of the expressions and marking them wrong.

    #212513 Reply

    fineman
    Member

    Thanks for the responses….I had missed that the problem filters were all disabled for MyEclipse by default.

    I added the JSTL support to this particular project using the MyEclipse functionality before upgrading to 3.8GA, so I think it is JSTL 1.0
    I wish to use JSTL expression language rather than JSP expressions in my attributes, so I think I am correct to use the c.tld not c-rt (as I have been doing for the last year in WebSphere Studio and also recently in 3.8beta2). Scott, I tried your suggestion of using the c-rt tag library… it does indeed remove the errors from the page but of course since c-rt doesn’t support Expression Language, the application no longer works.

    So it looks to me like the JSP validator doesn’t support Expression Language yet – is that right?

    #212524 Reply

    arnor
    Member

    I have the same problem.
    <c:out value=”${catRow.name}”/>
    I get an error about attribute value.

    then fineman are right! 🙂
    The right tld is c.tld.

    c-rt.tld is for a script like this:
    <c:out value=”<%=request.getContentType()>”/>

    regards Lorenzo

    #212549 Reply

    Riyad Kalla
    Member

    Neil,
    You are correct of your assessment with both the correct version of taglib you wish to use and why it doesn’t work. I asked this question to one of the devs and we are almost fully J2EE 1.4 compliant with the last missing piece being why JSTL 1.1 isn’t support just yet, but support will be in very soon. We just didn’t want to hold up the 3.8 GA release for it but should have it in a maintenence release after our bugfix release at the end of this week.

    #212629 Reply

    binyan
    Member

    I also have this problem and are projects are 100% jstl 1.0. Basically the jsp editor is barfing all over the place on the jstl tags. What is curious is that some pages have warnings about unknown tags while others have errors about “According to TLD or attribute directive in tag file, attribute value does not accept any expressions”

    Also the editor is sloooow.

    #212634 Reply

    Riyad Kalla
    Member

    binyan,
    we have a lot of bugs filed with the JSP editor and EL right now, we are looking at it with a magnifying glass to see what happened.

    #212683 Reply

    Wayne Kidd
    Member

    Many people had installed jstl 1.1 in MyEclipse (it worked on every release before this one). You could get it from Jakarta and deploy it to Tomcat. MyEclipse let you do it and did not complain about the tags from a J2EE 1.3 point of view. Tomcat still likes the tags. Myeclipse 3.8GA just suddenly decided the tags were an error. They work just fine when they get to Tomcat. In all the world (except 3.8GA) the tags are fine with EL expressions. You should emergency relax the restrictions until the full support is ready. People have real jsp’s that use them (and have been using them since 2.7 of MyEclipse. You can’t expect people to drop back while waiting several weeks (maybe monthe) for a subsequent release.

    Wayne

    #212686 Reply

    Riyad Kalla
    Member

    Wayne,
    We are going to relax this in the maintenence release as we realize there are some hickups in there and fix some bugs related to it. We are sorry for the trouble it has caused.

    #212758 Reply

    rmoskal
    Member

    Greetings:

    Dear me, this makes my current project dead in the water. Is it possible to install the last beta version over the normal release?

    Followup: You can indeed revert back to Beta 2

    Regards,

    Robert Moskal
    Most Media
    Brooklyn, USA

    #212776 Reply

    Riyad Kalla
    Member

    I’m not sure if you asked/answered your own question but just incase, yes you can “disable” this extension of MyEclipse and reinstall Beta2 to a different directory and install it as a new Extension.

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: JSTL attributes not accepting expressions in JSPs (3.8GA)

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