My EL not worky

Discussion in 'Java' started by Tom Anderson, Sep 4, 2009.

  1. Tom Anderson

    Tom Anderson Guest

    Hello chaps,

    This is a pretty rudimentary problem, i susect.

    I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings in the
    tags' attributes, everything works fine. If i put EL expressions in them,
    they're treated like plain strings - not interpreted as expressions.

    I reverted to 1.0, and it works fine.

    In 1.0, at least in the version i'm using (the 'el' rather than 'rt'
    variant), the tags are in charge of interpreting the EL. In 1.1, the
    container is supposed to do it, AIUI. It seems like it isn't. Is there
    something i need to do to switch it on? Some setting in the web.xml or
    such? I had a quick google, and couldn't see anything (i couldn't really
    construct a sensible query about it, though) - i haven't done anything
    really drastic like read a manual yet.

    I'm using JBoss EAP 4.2, FWIW.

    Cheers!

    tom

    --
    Computation is the basis of all life
     
    Tom Anderson, Sep 4, 2009
    #1
    1. Advertising

  2. Tom Anderson

    Arne Vajhøj Guest

    Tom Anderson wrote:
    > This is a pretty rudimentary problem, i susect.
    >
    > I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings in
    > the tags' attributes, everything works fine. If i put EL expressions in
    > them, they're treated like plain strings - not interpreted as expressions.
    >
    > I reverted to 1.0, and it works fine.
    >
    > In 1.0, at least in the version i'm using (the 'el' rather than 'rt'
    > variant), the tags are in charge of interpreting the EL. In 1.1, the
    > container is supposed to do it, AIUI. It seems like it isn't. Is there
    > something i need to do to switch it on? Some setting in the web.xml or
    > such? I had a quick google, and couldn't see anything (i couldn't really
    > construct a sensible query about it, though) - i haven't done anything
    > really drastic like read a manual yet.
    >
    > I'm using JBoss EAP 4.2, FWIW.


    Correct taglib URL (for the new versions that include "jsp")
    and correct servlet spec version in web.xml is the only two things
    I can think of.

    If that does not resolve it then post a hello world level example
    and the web-app tag in web.xml.

    Arne
     
    Arne Vajhøj, Sep 5, 2009
    #2
    1. Advertising

  3. Tom Anderson

    markspace Guest

    Tom Anderson wrote:
    >
    > I reverted to 1.0, and it works fine.



    Could this be related to EL defaults to being ignored?


    <%@ page isELIgnored="false" %>

    at the top of the page and see if that changes things.
     
    markspace, Sep 5, 2009
    #3
  4. Tom Anderson

    Roedy Green Guest

    On Fri, 4 Sep 2009 21:23:31 +0100, Tom Anderson <>
    wrote, quoted or indirectly quoted someone who said :

    >
    >I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings in the
    >tags' attributes, everything works fine. If i put EL expressions in them,
    >they're treated like plain strings - not interpreted as expressions.


    Let's see an example of your markup.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    "People think of security as a noun, something you go buy. In reality, it’s an abstract concept like happiness. Openness is unbelievably helpful to security."
    ~ James Gosling (born: 1955-05-18 age: 54), inventor of Java.
     
    Roedy Green, Sep 5, 2009
    #4
  5. Tom Anderson

    Arne Vajhøj Guest

    markspace wrote:
    > Tom Anderson wrote:
    >>
    >> I reverted to 1.0, and it works fine.

    >
    > Could this be related to EL defaults to being ignored?
    >
    > <%@ page isELIgnored="false" %>
    >
    > at the top of the page and see if that changes things.


    EL is default interpreted in JSP 2.0.

    Arne
     
    Arne Vajhøj, Sep 5, 2009
    #5
  6. Tom Anderson

    markspace Guest

    Arne Vajhøj wrote:
    > markspace wrote:
    >> Tom Anderson wrote:
    >>>
    >>> I reverted to 1.0, and it works fine.

    >>
    >> Could this be related to EL defaults to being ignored?
    >>
    >> <%@ page isELIgnored="false" %>
    >>
    >> at the top of the page and see if that changes things.

    >
    > EL is default interpreted in JSP 2.0.



    Are you sure? I thought it was enabled by default in JSP 2.3, but
    disabled in 2.0. I might be mistaken about that however.
     
    markspace, Sep 5, 2009
    #6
  7. Tom Anderson

    Arne Vajhøj Guest

    markspace wrote:
    > Arne Vajhøj wrote:
    >> markspace wrote:
    >>> Tom Anderson wrote:
    >>>>
    >>>> I reverted to 1.0, and it works fine.
    >>>
    >>> Could this be related to EL defaults to being ignored?
    >>>
    >>> <%@ page isELIgnored="false" %>
    >>>
    >>> at the top of the page and see if that changes things.

    >>
    >> EL is default interpreted in JSP 2.0.

    >
    > Are you sure? I thought it was enabled by default in JSP 2.3, but
    > disabled in 2.0. I might be mistaken about that however.


    Yes - I am sure.

    But I think you have been confused by all the versions.

    JSP 2.3 does not exist yet.

    JSP 2.0 - Servlet 2.4
    JSP 1.2 - Servlet 2.3

    It is disabled by default in 1.2 according to the JSP 2.0 spec.

    Arne
     
    Arne Vajhøj, Sep 5, 2009
    #7
  8. Tom Anderson

    markspace Guest

    Arne Vajhøj wrote:

    > Yes - I am sure.
    >
    > But I think you have been confused by all the versions.



    Confused by the internet actually. Sometimes Google is not your friend.
    Thanks for the correction. ;)
     
    markspace, Sep 5, 2009
    #8
  9. Tom Anderson

    Arne Vajhøj Guest

    markspace wrote:
    > Arne Vajhøj wrote:
    >> Yes - I am sure.
    >>
    >> But I think you have been confused by all the versions.

    >
    > Confused by the internet actually. Sometimes Google is not your friend.


    It could have been because it is a version number soup.

    Java EE soup:

    J2EE/Java EE 5 1.4 1.3 1.2
    Servlet 2.5 2.4 2.3 2.2
    EJB 3.0 2.1 2.0 1.1
    JSP 2.1 2.0 1.2 1.1
    JCA 1.5 1.5 1.0
    JSF 1.2

    Arne
     
    Arne Vajhøj, Sep 5, 2009
    #9
  10. Tom Anderson

    markspace Guest

    Arne Vajhøj wrote:

    > Java EE soup:
    >
    > J2EE/Java EE 5 1.4 1.3 1.2
    > Servlet 2.5 2.4 2.3 2.2
    > EJB 3.0 2.1 2.0 1.1
    > JSP 2.1 2.0 1.2 1.1
    > JCA 1.5 1.5 1.0
    > JSF 1.2



    This is a great table, thanks for posting it. :)
     
    markspace, Sep 5, 2009
    #10
  11. Tom Anderson

    Tom Anderson Guest

    On Fri, 4 Sep 2009, Arne Vajh?j wrote:

    > Tom Anderson wrote:
    >> This is a pretty rudimentary problem, i susect.
    >>
    >> I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings in the
    >> tags' attributes, everything works fine. If i put EL expressions in them,
    >> they're treated like plain strings - not interpreted as expressions.
    >>
    >> I reverted to 1.0, and it works fine.
    >>
    >> In 1.0, at least in the version i'm using (the 'el' rather than 'rt'
    >> variant), the tags are in charge of interpreting the EL. In 1.1, the
    >> container is supposed to do it, AIUI. It seems like it isn't. Is there
    >> something i need to do to switch it on? Some setting in the web.xml or
    >> such? I had a quick google, and couldn't see anything (i couldn't really
    >> construct a sensible query about it, though) - i haven't done anything
    >> really drastic like read a manual yet.
    >>
    >> I'm using JBoss EAP 4.2, FWIW.

    >
    > Correct taglib URL (for the new versions that include "jsp")


    Yup.

    > and correct servlet spec version in web.xml


    Aha, i didn't check that - will do.

    > is the only two things I can think of.
    >
    > If that does not resolve it then post a hello world level example
    > and the web-app tag in web.xml.


    Yes, i really should have supplied that, sorry. The code is on a virtual
    machine which i can only reach from my office, and although i can
    remote-access into my office, just thinking about the number of layers of
    port forwarding and remoting it would involve makes my head hurt, so the
    code will have to wait until tuesday.

    tom

    --
    I prefer gin now sleep doesn't want me anyway.
     
    Tom Anderson, Sep 5, 2009
    #11
  12. Tom Anderson

    Daniel Pitts Guest

    Tom Anderson wrote:
    > Hello chaps,
    >
    > This is a pretty rudimentary problem, i susect.
    >
    > I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings in
    > the tags' attributes, everything works fine. If i put EL expressions in
    > them, they're treated like plain strings - not interpreted as expressions.
    >
    > I reverted to 1.0, and it works fine.
    >
    > In 1.0, at least in the version i'm using (the 'el' rather than 'rt'
    > variant), the tags are in charge of interpreting the EL. In 1.1, the
    > container is supposed to do it, AIUI. It seems like it isn't. Is there
    > something i need to do to switch it on? Some setting in the web.xml or
    > such? I had a quick google, and couldn't see anything (i couldn't really
    > construct a sensible query about it, though) - i haven't done anything
    > really drastic like read a manual yet.
    >
    > I'm using JBoss EAP 4.2, FWIW.
    >
    > Cheers!
    >
    > tom
    >


    When you put the EL expression in them, do you enclose it with "${}"?

    I have never come across this problem, so I'm only making a (very
    slightly educated) guess.

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
     
    Daniel Pitts, Sep 7, 2009
    #12
  13. Tom Anderson

    Lew Guest

    Tom Anderson wrote:
    >> I wrote a JSP using the JSTL 1.1 'c' taglib. If i [sic] put plain strings in
    >> the tags' attributes, everything works fine. If i [sic] put EL expressions
    >> in them, they're treated like plain strings - not interpreted as
    >> expressions.
    >>
    >> I reverted to 1.0, and it works fine.
    >>
    >> In 1.0, at least in the version i'm [sic] using (the 'el' rather than 'rt'
    >> variant), the tags are in charge of interpreting the EL. In 1.1, the
    >> container is supposed to do it, AIUI. It seems like it isn't. Is there
    >> something i [sic] need to do to switch it on? Some setting in the web.xml or
    >> such? I had a quick google, and couldn't see anything (i [sic] couldn't
    >> really construct a sensible query about it, though) - i [sic] haven't done
    >> anything really drastic like read a manual yet.
    >>
    >> I'm using JBoss EAP 4.2, FWIW.


    Daniel Pitts wrote:
    > When you put the EL expression in them, do you enclose it with "${}"?
    >
    > I have never come across this problem, so I'm only making a (very
    > slightly educated) guess.


    Or "#{...}"?

    --
    Lew
     
    Lew, Sep 7, 2009
    #13
  14. Tom Anderson

    Tom Anderson Guest

    On Sun, 6 Sep 2009, Daniel Pitts wrote:

    > Tom Anderson wrote:
    >
    >> I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings in the
    >> tags' attributes, everything works fine. If i put EL expressions in them,
    >> they're treated like plain strings - not interpreted as expressions.

    >
    > When you put the EL expression in them, do you enclose it with "${}"?


    Indeed i do! And the computer is plugged in and switched on. :)

    tom

    --
    Ensure a star-man is never constructed!
     
    Tom Anderson, Sep 7, 2009
    #14
  15. Tom Anderson

    Daniel Pitts Guest

    Tom Anderson wrote:
    > On Sun, 6 Sep 2009, Daniel Pitts wrote:
    >
    >> Tom Anderson wrote:
    >>
    >>> I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings
    >>> in the tags' attributes, everything works fine. If i put EL
    >>> expressions in them, they're treated like plain strings - not
    >>> interpreted as expressions.

    >>
    >> When you put the EL expression in them, do you enclose it with "${}"?

    >
    > Indeed i do! And the computer is plugged in and switched on. :)
    >

    Sounds like you need to talk to the OS manufacturer. (I've actually
    been told that when my screen died on my HP laptop)

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
     
    Daniel Pitts, Sep 7, 2009
    #15
  16. In article <xubpm.291740$>,
    Daniel Pitts <> wrote:

    > Tom Anderson wrote:
    > > On Sun, 6 Sep 2009, Daniel Pitts wrote:
    > >
    > >> Tom Anderson wrote:
    > >>
    > >>> I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings
    > >>> in the tags' attributes, everything works fine. If i put EL
    > >>> expressions in them, they're treated like plain strings - not
    > >>> interpreted as expressions.
    > >>
    > >> When you put the EL expression in them, do you enclose it with "${}"?

    > >
    > > Indeed i do! And the computer is plugged in and switched on. :)
    > >

    > Sounds like you need to talk to the OS manufacturer. (I've actually
    > been told that when my screen died on my HP laptop)


    Or a credit card problem. (I was told this regarding a free OS update:)

    I am EL clueless, but is there anything useful here?

    <http://java.sun.com/developer/EJTechTips/2003/tt1222.html>

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Sep 7, 2009
    #16
  17. Tom Anderson

    Arne Vajhøj Guest

    Tom Anderson wrote:
    > On Fri, 4 Sep 2009, Arne Vajh?j wrote:
    >> Tom Anderson wrote:
    >>> This is a pretty rudimentary problem, i susect.
    >>>
    >>> I wrote a JSP using the JSTL 1.1 'c' taglib. If i put plain strings
    >>> in the tags' attributes, everything works fine. If i put EL
    >>> expressions in them, they're treated like plain strings - not
    >>> interpreted as expressions.
    >>>
    >>> I reverted to 1.0, and it works fine.
    >>>
    >>> In 1.0, at least in the version i'm using (the 'el' rather than 'rt'
    >>> variant), the tags are in charge of interpreting the EL. In 1.1, the
    >>> container is supposed to do it, AIUI. It seems like it isn't. Is
    >>> there something i need to do to switch it on? Some setting in the
    >>> web.xml or such? I had a quick google, and couldn't see anything (i
    >>> couldn't really construct a sensible query about it, though) - i
    >>> haven't done anything really drastic like read a manual yet.
    >>>
    >>> I'm using JBoss EAP 4.2, FWIW.

    >>
    >> Correct taglib URL (for the new versions that include "jsp")

    >
    > Yup.
    >
    >> and correct servlet spec version in web.xml

    >
    > Aha, i didn't check that - will do.
    >
    >> is the only two things I can think of.
    >>
    >> If that does not resolve it then post a hello world level example
    >> and the web-app tag in web.xml.

    >
    > Yes, i really should have supplied that, sorry. The code is on a virtual
    > machine which i can only reach from my office, and although i can
    > remote-access into my office, just thinking about the number of layers
    > of port forwarding and remoting it would involve makes my head hurt, so
    > the code will have to wait until tuesday.


    Hey - *we* are not in any hurry.

    Arne
     
    Arne Vajhøj, Sep 8, 2009
    #17
    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. Roxanne
    Replies:
    0
    Views:
    1,237
    Roxanne
    Jul 4, 2003
  2. Andy Elmhorst
    Replies:
    2
    Views:
    498
    Bassel Tabbara [MSFT]
    Jul 8, 2003
  3. Kristian Domke
    Replies:
    11
    Views:
    509
    George Sakkis
    Jan 23, 2008
  4. Stephanie Stowe
    Replies:
    2
    Views:
    220
    Peter X
    Apr 7, 2004
  5. Ruby Freak

    To be not, or not to be not?

    Ruby Freak, Sep 23, 2008, in forum: Ruby
    Replies:
    2
    Views:
    144
    Thomas B.
    Sep 23, 2008
Loading...

Share This Page