A few reasons: * Ognl offers much more power than JSTL. My favorite is the ability to create a Map or List on the fly: <ww:select label=”’Gender’” name=”’gender’” list=”#{‘true’ : ‘Male’, ‘false’ : ‘Female’}”/> * By having a stack you can do things like: <ww:iterator value=”foos”> <ww:property value=”[1].bar”/> <!—something not in foos --> <ww:property/> <!—something in foos --> </ww:iterator> * Type conversion – this is a huge win. Ognl assists doing type conversion and coercion at any level. JSTL is strictly used for getting, but Ognl is also used for setting. The type conversion limits how much “glue” you have to provide in your action by letting WebWork do more of the glue for you. In contract, notice Struts’ FormBeans are usually always String parameters (I believe they support trivial type conversion, but that’s not enough).
-----Original Message-----
I've been playing around with ww2 for a month or so and I love it! However there is something I'm missing and that is the value in the OgnlValueStack. As a stack itself it is great! I can get parameters out of the request (thanks ParameterizedInterceptor). And I guess I could use it to transfer variables from Action to Action in a chained action result, but ActionContext is eaiser for that purpose. Ognl allows you to do expresson language stuff in the JSP's... but so can JSTL, therefore why would I choose OGNL expresson over JSTL? Kris Thompson |
Title: The value in the OgnlValueStack?
- [OS-webwork] The value in the OgnlValueStack? Thompson, Christopher
- [OS-webwork] TokenInterceptor Fred Lamuette
- [OS-webwork] The value in the OgnlValueStack? Patrick Lightbody
- [OS-webwork] The value in the OgnlValueStack? Thompson, Christopher
- RE: [OS-webwork] The value in the OgnlValueStac... Jason Carreira