tags:

views:

130

answers:

2

Say that I don't leverage OGNL to create my Struts2 web application and just purely uses typical el provided by Sun. What would be the downside of it?

As far as I know, OGNL is a kind of expression which attempts to match the best matched value from ValueStack based on its current state. Could it also be achieved by just using EL alone instead?

Thanks in advance for the responses

Daniel

+1  A: 

I don't think it is possible to do even if you choose not to use OGNL with your struts2 web application. OGNL is used internally by struts2 for data transfer and type conversion. If you're planning to use struts2, you'll have to use OGNL and if u don't do it, struts2 will do it automatically.

Although you may leave out OGNL And use pure EL, but that way the whole purpose of using struts2 gets defeated cause if you're not using built-in features of struts2, you're probably writing those mechanisms from scratch using EL.

Although it may seem odd initially, but OGNL is quite powerful and worth considering when developing in struts2.

Amit Sharma