• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ignore Expression Language (EL) Evaluation

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm currently doing upgrade of our codes to the latest version. However, after migration, JSTL tags are working fine but our custom tags (that have their own EL evaluation) are not working anymore. The root cause is that the EL has been evaluated twice since EL is now enabled by default based on the latest version of web container and JSP.

I tried to set the web.xml with the codes below. The custom tags are working but the JSTL fails.
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>true</el-ignored>
</jsp-property-group>

Question: Is it possible to disable or ignore EL evaluation of the web container for our custom tags but remain enabled for JSTL?

Upgrade Details:
Web Container: From 2.3 to 2.5.
JSP: From 1.2 to 2.1.
JSTL: From 1.0.3 to 1.2.

Thanks!
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. It's an all or nothing deal. You'll need to update your tags to modern standards. The EL has been evaluated by the JSP engine since JSP 2.0 was introduced almost 10 years ago.
 
Edwin Ubongen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your suggestion.

Follow up question. One of the custom tags that fails when we used the latest version of JSTL and kept the el expression enabled is the struts-el tag library. Do you know how are we going to resolve/update this tag to new standards?

Thanks!
 
Edwin Ubongen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I just simply migrate from struts-el to regular struts?
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not the struts forum, I'll move this post there for you.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>Can I just simply migrate from struts-el to regular struts?
Yes.

Just replace the tag import uri for the struts-el tag library with the one for the standard struts tag library.
The actual usage of the tag on your page should work unchanged.

From JSP2.0 onwards, EL expressions became runtime expressions for the container, so they can be used anywhere you can use <%= scriptletExpressions %>

In JSP1.2 it had to be a String which was then interpreted as an EL expression. Which is why none of the EL tags accepted standard runtime expressions, because it would have been overly confusing.


 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic