My EL not worky

T

Tom Anderson

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
 
A

Arne Vajhøj

Tom said:
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
 
M

markspace

Tom said:
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.
 
R

Roedy Green

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

Arne Vajhøj

markspace said:
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
 
M

markspace

Arne said:
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.
 
A

Arne Vajhøj

markspace said:
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
 
M

markspace

Arne said:
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. ;)
 
A

Arne Vajhøj

markspace said:
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
 
M

markspace

Arne said:
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. :)
 
T

Tom Anderson

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
 
D

Daniel Pitts

Tom said:
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.
 
L

Lew

Tom said:
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 said:
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 "#{...}"?
 
D

Daniel Pitts

Tom said:
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)
 
A

Arne Vajhøj

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


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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top