Forums Register Login

jstl "expression language ( "${...}" ) in static text

+Pie Number of slices to send: Send
Hi,

I'm a newbie user of jstl "expression language" .
I've got it to work *within tags*, but not in static text.
E.g:
Here's how i use it in a tag: <c ut value="${2+2}" >.
This works fine and prints out "4".

But here's how I use it in static text:
<html> This is some static text ${2+2} </html>
This does not evaluate to "4"... instead, it literally prints out ${2+2}.

I'm using tomcat 5 with jakarta's implementation for jstl.
I've even added the following to my web.xml :
< el-enabled>true < / el-enabled >
It did not help.
Am I doing it wrong ? I've double-checked with various web tutorials, and they all state that EL *should* work with static text...

Thanks !
+Pie Number of slices to send: Send
Two things:

1) Be sure that your web app is declared as a Servlet 2.4 web app in the web.xml

2) Be sure that you are using a JSTL 1.1 implementation
+Pie Number of slices to send: Send
Thanks a million, your quick reply has been a real life saver ))


For anyone reading this, if you need to configure tomcat for 2.4 spec, here's a link I found useful:

http://indrayam.com/archives/application_development/000243.php
Always look on the bright side of life. At least this ad is really tiny:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1235 times.
Similar Threads
EL not working on my Tomcat test environment
JSTL + custom tags
EL doubt
Expression Language Doubt
EL doubt
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:23:36.