File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ignore Expression Language (EL) Evaluation

 
Edwin Ubongen
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • 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!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 1
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I just simply migrate from struts-el to regular struts?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not the struts forum, I'll move this post there for you.
 
Stefan Evans
Bartender
Posts: 1640
9
  • 0
  • Mark post as helpful
  • send pies
  • 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.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic