This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 60810

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

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
subject: Struts2
Similar Threads