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

  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. 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. Robert Mark Bram

    Custom JSTL that accepts JSTL expression

    Robert Mark Bram, Dec 15, 2004, in forum: Java
    Replies:
    0
    Views:
    977
    Robert Mark Bram
    Dec 15, 2004
  2. sickness
    Replies:
    0
    Views:
    2,299
    sickness
    May 11, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,033
    Smokey Grindel
    Dec 2, 2006
  4. DaFoot
    Replies:
    1
    Views:
    1,704
    DaFoot
    Oct 23, 2008
  5. Fabio Zadrozny
    Replies:
    1
    Views:
    258
    Jon Clements
    Jan 27, 2009
Loading...

Share This Page