jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2" Watch "Struts2" New topic


parag dandegaonkar

Joined: Jan 30, 2009
Posts: 7
hi to all
can anyone tell me in struts2 can we use EL Expressions instead of OGNL?if yes Then How

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
My Struts is a little rusty but generally if you have plain request attributes instead of using the Struts stack you should be able to use plain old EL. So just try to get a reference on the request or session or whatever scope you want to use in your action.

JDBCSupport - An easy to use, light-weight JDBC framework -
David Newton

Joined: Sep 29, 2008
Posts: 12617

Yes, you can; just write it. Struts 2 wraps requests in a way such that JSP EL lookups are first checked against the value stack. If value stack lookup fails it's handled by the default JSP EL processing.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: Struts2
It's not a secret anymore!