Results 1 to 9 of 9

Thread: JSP 2.0 and losing the c:out tags

  1. #1

    Default JSP 2.0 and losing the c:out tags

    I'm obviously missing something here.

    I'm using a Tomcat, which supports JSP 2.0, but I can't drop the c:out tags, ie if I change <c:out value="${foo.bar}"/> (which works) to ${foo.bar} what happens is my page shows ${foo.bar} in the output: obviously not what I want!

    <p>I've amedned the <jsp-version> tag to 2.0 and <taglib-version> to 1.1 in spring.tld but to no avail. What am I missing?

  2. #2
    Join Date
    Aug 2004
    Location
    Brisbane, Australia
    Posts
    4

    Default Re: JSP 2.0 and losing the c:out tags

    Quote Originally Posted by Edward Kenworthy
    I'm obviously missing something here.

    I'm using a Tomcat, which supports JSP 2.0, but I can't drop the c:out tags, ie if I change <c:out value="${foo.bar}"/> (which works) to ${foo.bar} what happens is my page shows ${foo.bar} in the output: obviously not what I want!

    <p>I've amedned the <jsp-version> tag to 2.0 and <taglib-version> to 1.1 in spring.tld but to no avail. What am I missing?
    What version of the web-app.xml are you using? If you are using the older 2.3 version the EL expressions are ignored by default and you'll need a jsp page directive to set isElIgnored = false.

    Code:
    <%@page isElIgnored="false"%>
    Andrew.

  3. #3
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    Make sure you've got:
    Code:
    <%@ taglib prefix="c" uri="http&#58;//java.sun.com/jsp/jstl/core" %>
    instead of:
    Code:
    <%@ taglib prefix="c" uri="http&#58;//java.sun.com/jstl/core" %>

  4. #4

    Default Re: JSP 2.0 and losing the c:out tags

    Quote Originally Posted by andrew.daws
    Code:
    <%@page isElIgnored="false"%>
    Andrew.
    No good, Tomcat complains about it being an invalid page directive.

  5. #5

    Default

    Quote Originally Posted by katentim
    Make sure you've got:
    Code:
    <%@ taglib prefix="c" uri="http&#58;//java.sun.com/jsp/jstl/core" %>
    instead of:
    Code:
    <%@ taglib prefix="c" uri="http&#58;//java.sun.com/jstl/core" %>
    Tried that but I get:

    The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application.

    Do I need to update the jstl.jar I'm using?

    Would I be better off simply updating the whole of my Spring setup to 1.1.1 (I'm currently on 1.0)?

  6. #6

    Default Re: JSP 2.0 and losing the c:out tags

    Quote Originally Posted by Edward Kenworthy
    Quote Originally Posted by andrew.daws
    Code:
    <%@page isElIgnored="false"%>
    Andrew.
    No good, Tomcat complains about it being an invalid page directive.
    OK looks like a case thing: isELIgnored works, well sort of. Now I get it complaining that:

    According to TLD or attribute directive in tag file, attribute items does not accept any expressions

    <c:forEach items="${model.splashes}" var="splash">

    One step forward and one back :-)

  7. #7
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    You've got the wrong jars by the sound of it. Try downloading jakarta-taglibs-standard-1.1.1. Drop in the new jstl.jar and standard.jar and it should work.

  8. #8

    Default

    Quote Originally Posted by katentim
    You've got the wrong jars by the sound of it. Try downloading jakarta-taglibs-standard-1.1.1. Drop in the new jstl.jar and standard.jar and it should work.
    That was exactly right: all working now, thanks to everyone that replied :-)

  9. #9
    Join Date
    Mar 2005
    Location
    Liverpool, UK
    Posts
    21

    Default

    this thread helped me too, just wanted to say thanks.
    [Newbie to Spring!]

Similar Threads

  1. Weblogic losing flow execution id
    By ruipacheco in forum Web Flow
    Replies: 8
    Last Post: Aug 15th, 2008, 11:34 AM
  2. Replies: 37
    Last Post: Dec 6th, 2007, 10:02 AM
  3. Replies: 8
    Last Post: Jul 28th, 2005, 10:42 AM
  4. losing context
    By jmoore in forum Container
    Replies: 3
    Last Post: Mar 31st, 2005, 01:53 PM
  5. Losing reference data
    By oh in forum Web
    Replies: 2
    Last Post: Oct 4th, 2004, 12:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •