You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Asthana, Rahul" <Ra...@CIBC.com> on 2006/11/09 19:54:39 UTC

Struts 2 and JSTL

Hi All,
Is JSTL and JSTL EL the library and expression language of choice in Struts 2? I read about OGNL somewhere.What library does it use?
What are its advantages over JSTL?
regards
Rahul

Re: Struts 2 and JSTL

Posted by Ian Roughley <ia...@fdar.com>.
I think you can (still) also use OGNL in the configuration files.

/Ian

-- 
>From Down & Around, Inc.
Innovative IT Solutions
Software Architecture * Design * Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
web:      www.fdar.com  
email     ian@fdar.com  
phone:    617.821.5430
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Laurie Harper wrote:
> Asthana, Rahul wrote:
>> Hi All,
>> Is JSTL and JSTL EL the library and expression language of choice in 
>> Struts 2? I read about OGNL somewhere.What library does it use?
>> What are its advantages over JSTL?
>
> JSTL is a standard, but only works in JSP files. It provides both an 
> EL and a set of custom tags.
>
> OGNL is an EL only (AFAIK), but it much more powerful and flexible 
> than the EL supplied by JSTL. It's also much more tightly integrated 
> with Struts 2, and works with all the view template technologies 
> Struts 2 supports (JSPs, Freemarker, Velocity, etc.).
>
> If you're using Struts 2, you probably want to be using OGNL rather 
> than JSTL EL. Doing so will make your view templates much simpler.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 and JSTL

Posted by Laurie Harper <la...@holoweb.net>.
Asthana, Rahul wrote:
> Hi All,
> Is JSTL and JSTL EL the library and expression language of choice in Struts 2? I read about OGNL somewhere.What library does it use?
> What are its advantages over JSTL?

JSTL is a standard, but only works in JSP files. It provides both an EL 
and a set of custom tags.

OGNL is an EL only (AFAIK), but it much more powerful and flexible than 
the EL supplied by JSTL. It's also much more tightly integrated with 
Struts 2, and works with all the view template technologies Struts 2 
supports (JSPs, Freemarker, Velocity, etc.).

If you're using Struts 2, you probably want to be using OGNL rather than 
JSTL EL. Doing so will make your view templates much simpler.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org