jstl and c:out value not being evaluated

Discussion in 'Java' started by Damian Sobieralski, May 28, 2004.

  1. I'm hoping someone can help me. I'm going crazy trying to figure this
    out. I've done a search through groups.google.com to no avail. If
    this belongs somewhere else, please let me know.

    I have been teaching myself struts. I've been using the logic tags
    and wanted to move to jstl core tags.

    My configuration is as follows:

    Tomcat 5.0.13

    I downloaded the Jakarta-taglibs-standard-current.zip file. I
    extracted jstl.jar and standard.jar and placed these in my
    APPLICATION//WEB-INF/lib directory. I then extracted the c.tld and
    placed it in APPLICATION/WEB-INF. My relevant part of my web.xml
    looks as follows:

    <taglib>
    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
    <taglib>

    I then try to display a simple jsp file to test this.
    APPLICATION/Test.jsp

    Test.jsp:

    <%@page contentType="text/html"%>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <c:eek:ut value="${2 + 2}" />

    </body>
    </html>

    The result I get on the page is:

    ${2 + 2}

    I'll assume I am doing something fundamentally wrong here. Why isn't
    the value in the c:eek:ut being evaluated and printing 4 instead of the
    literal "${2 + 2}"? The Tomcat configuration seems fine, as the
    struts' logic tags are working fine.

    ---
    Damian Sobieralski
    Damian Sobieralski, May 28, 2004
    #1
    1. Advertising

  2. Problem solved:

    http://forum.java.sun.com/thread.jsp?forum=45&thread=506444

    I added:
    <%@ page isELIgnored="false"%>
    to the jsp page. I get a 4!!

    :)


    On Fri, 28 May 2004 11:42:52 -0700, Damian Sobieralski
    <> wrote:

    >I'm hoping someone can help me. I'm going crazy trying to figure this
    >out. I've done a search through groups.google.com to no avail. If
    >this belongs somewhere else, please let me know.
    >
    > I have been teaching myself struts. I've been using the logic tags
    >and wanted to move to jstl core tags.
    >
    >My configuration is as follows:
    >
    >Tomcat 5.0.13
    >
    >I downloaded the Jakarta-taglibs-standard-current.zip file. I
    >extracted jstl.jar and standard.jar and placed these in my
    >APPLICATION//WEB-INF/lib directory. I then extracted the c.tld and
    >placed it in APPLICATION/WEB-INF. My relevant part of my web.xml
    >looks as follows:
    >
    ><taglib>
    > <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    > <taglib-location>/WEB-INF/c.tld</taglib-location>
    ><taglib>
    >
    >I then try to display a simple jsp file to test this.
    >APPLICATION/Test.jsp
    >
    >Test.jsp:
    >
    ><%@page contentType="text/html"%>
    ><%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    ><html>
    ><head><title>JSP Page</title></head>
    ><body>
    ><c:eek:ut value="${2 + 2}" />
    >
    ></body>
    ></html>
    >
    > The result I get on the page is:
    >
    >${2 + 2}
    >
    >I'll assume I am doing something fundamentally wrong here. Why isn't
    >the value in the c:eek:ut being evaluated and printing 4 instead of the
    >literal "${2 + 2}"? The Tomcat configuration seems fine, as the
    >struts' logic tags are working fine.
    >
    >---
    >Damian Sobieralski
    >
    Damian Sobieralski, May 28, 2004
    #2
    1. Advertising

  3. Damian Sobieralski

    Sudsy Guest

    Damian Sobieralski wrote:
    > I'm hoping someone can help me. I'm going crazy trying to figure this
    > out. I've done a search through groups.google.com to no avail. If
    > this belongs somewhere else, please let me know.
    >
    > I have been teaching myself struts. I've been using the logic tags
    > and wanted to move to jstl core tags.

    <snip>
    > <taglib>
    > <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    > <taglib-location>/WEB-INF/c.tld</taglib-location>
    > <taglib>


    Shouldn't this be </taglib>? Or was it just a typo? Always best to
    cut-and-paste from the real files...
    Sudsy, May 29, 2004
    #3
  4. On Fri, 28 May 2004 19:02:00 -0400, Sudsy <>
    wrote:

    >Damian Sobieralski wrote:
    >> I'm hoping someone can help me. I'm going crazy trying to figure this
    >> out. I've done a search through groups.google.com to no avail. If
    >> this belongs somewhere else, please let me know.
    >>
    >> I have been teaching myself struts. I've been using the logic tags
    >> and wanted to move to jstl core tags.

    ><snip>
    >> <taglib>
    >> <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    >> <taglib-location>/WEB-INF/c.tld</taglib-location>
    >> <taglib>

    >
    >Shouldn't this be </taglib>? Or was it just a typo? Always best to
    >cut-and-paste from the real files...


    Yup, it's supposed to be </taglib>. I did copy-paste from a real
    file but I cleaned up the message a bit before I sent it and
    apperently I deleted the wrong tag :)
    Damian Sobieralski, Jun 2, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris
    Replies:
    1
    Views:
    3,924
    Christophe Vanfleteren
    Jan 9, 2004
  2. Dale
    Replies:
    2
    Views:
    4,136
  3. Robert Mark Bram

    Custom JSTL that accepts JSTL expression

    Robert Mark Bram, Dec 15, 2004, in forum: Java
    Replies:
    0
    Views:
    970
    Robert Mark Bram
    Dec 15, 2004
  4. jsguru72

    JSTL c:out not printing value

    jsguru72, Sep 4, 2008, in forum: Java
    Replies:
    5
    Views:
    2,352
    Arne Vajhøj
    Sep 5, 2008
  5. DaFoot
    Replies:
    1
    Views:
    1,690
    DaFoot
    Oct 23, 2008
Loading...

Share This Page