struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vitor Souza <>
Subject Will Struts2 use OGNL as WW did?
Date Wed, 01 Nov 2006 14:49:23 GMT
Hello there,

Let's go straight to the question: will Struts2 continue to use OGNL as WebWork used to? Does
that mean that OGNL will continue to be developed?

Now to the long story... Sometime ago I posted a message at the OGNL forum. Here's the link:

The message talks about the fact that OGNL doesn't like generics. I created some utility classes
that make heavy use of Generics and I use them all over the system, for instance: 

* Domain objects extend PersistentObject<Long, Long> (<id-class, version-column-class>);

* A service class that perform CRUD operations on Measure objects extend CrudServiceSupport<Measure,

* A WebWork action class that provides access to the CRUD services for Measure objects extend
CrudAction<Measure, Long>.

Using those generic classes makes OGNL throw a bunch of exceptions, stating that it could
not convert the data sent to the Action to the correct type. After some investigation I narrowed
the problem to the generics issue and hacked OgnlRuntime so it would work. This is documented
at the post I mentioned before.

Now I just ran into a new issue that is probably related: when sending data through ww:checkbox
to be placed in a Long[] property of the Action class (which is defined as I[] - the generic
type - in the superclass CrudAction), OGNL throws the exceptions again. You can see the full
stack trace here:

If any of you would like to see the complete source code of my application, you can download
it here: It's the complete
Eclipse 3.2 project (using Web Tools), without the dependencies (which can be obtained using
Ant + Ivy). The packaged WebApp (with all the JARs and everything) is also available if anyone
wants to try and reproduce the error:
It's 12 MB, though.

Why am I posting this message here? When I ran into the OGNL issue again, I considered porting
this example application I made available (Cookbook) to Struts2 to see if it would solve the
problem. But then I saw that Struts depends on OGNL just like WebWork did. In fact, it states
it depends on OGNL 2.6.7 and the problem occurs with OGNL 2.6.9. Does that mean that the problem
will also occur if I port the application to Struts2 or was something done about this?

Thanks in advance for any replies,

Vitor Souza
Posted via Jive Forums

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message