why JSTL expression language doesn't work?

Discussion in 'Java' started by sm, Sep 12, 2003.

  1. sm

    sm Guest

    Hi, I am using jwsdp-1.2, together with struts 1.1.
    I want to use JSTL under that environment, but <c:...> tags work, the
    EL doesn't, the following page:

    ------------------------------
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <html>
    <c:eek:ut value="literal string"/>
    <% pageContext.setAttribute("filename", "mytestfilename"); %>
    filename is <c:eek:ut value="${filename}"/>
    </html>
    ------------------------------

    placed under ROOT (so to make it as simple as possible), runs, gives
    output:

    ------------------------
    literal string
    filename is ${filename}
    ------------------------

    seems like somehow EL is not enabled? but the strange thing is JTSL
    example code works within their war.

    any help appreciated!
     
    sm, Sep 12, 2003
    #1
    1. Advertisements

  2. Try ${pageScope.filename}.

    --olaf

    (sm) writes:

    > Hi, I am using jwsdp-1.2, together with struts 1.1.
    > I want to use JSTL under that environment, but <c:...> tags work, the
    > EL doesn't, the following page:
    >
    > ------------------------------
    > <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    > <html>
    > <c:eek:ut value="literal string"/>
    > <% pageContext.setAttribute("filename", "mytestfilename"); %>
    > filename is <c:eek:ut value="${filename}"/>
    > </html>
    > ------------------------------
    >
    > placed under ROOT (so to make it as simple as possible), runs, gives
    > output:
    >
    > ------------------------
    > literal string
    > filename is ${filename}
    > ------------------------
    >
    > seems like somehow EL is not enabled? but the strange thing is JTSL
    > example code works within their war.
    >
    > any help appreciated!
     
    Olaf Heimburger, Sep 14, 2003
    #2
    1. Advertisements

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. David Prowak

    Why oh why doesn't my data view work?

    David Prowak, Jan 30, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    928
    Alvin Bruney [MVP]
    Jan 30, 2004
  2. Robert Mark Bram

    Custom JSTL that accepts JSTL expression

    Robert Mark Bram, Dec 15, 2004, in forum: Java
    Replies:
    0
    Views:
    1,293
    Robert Mark Bram
    Dec 15, 2004
  3. sickness
    Replies:
    0
    Views:
    2,434
    sickness
    May 11, 2006
  4. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    1,386
    Mark Rae
    Dec 21, 2006
  5. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,853
    Smokey Grindel
    Dec 2, 2006
  6. DaFoot
    Replies:
    1
    Views:
    2,047
    DaFoot
    Oct 23, 2008
  7. Fabio Zadrozny
    Replies:
    1
    Views:
    329
    Jon Clements
    Jan 27, 2009
  8. Gabriel Genellina
    Replies:
    11
    Views:
    478
    Aaron Brady
    Jan 31, 2009
Loading...