This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes struts-el vs EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts-el vs EL" Watch "struts-el vs EL" New topic

struts-el vs EL

Tony Smith
Ranch Hand

Joined: Jul 07, 2007
Posts: 229
I am reading about struts-el seems really similar to EL. I looked online a little bit, seems like that is what people use before EL was invented. Is there any reason to use struts-el? Is there distinct difference between struts-el and EL?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If your web application is a Servlet Version 2.4 application, You can use an EL expression anywhere in the JSP, including as an attribute of a Struts tag.

If your application is a Servlet 2.3 application, you must use the struts-el version of the Struts tags in order to substitute an EL expression as an attribute of a Struts tag. If you want to display the value of an EL expression anywhere else in your JSP, you must enclose it in a JSTL cut tag.

As far as the EL language itself, there is no difference. The syntax for an EL expression is the same regarless of which method you use.

Consultant, Sima Solutions
subject: struts-el vs EL
Similar Threads
JSP Expression Language
howto pass parameter to struts tag ?
using struts logic empty tag with request
Ignore Expression Language (EL) Evaluation
To Hans: Classic Tag, Simple Tag and Tag files