struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas De Loof <>
Subject Stripes-like RequestProcessor
Date Tue, 11 Apr 2006 12:42:15 GMT

Hello all,

First, please notice I'm glad with Struts and don't want to start a new 
"Is struts dead ?" thread.

I've read Matt Raible's Java web framework sweet spot [1] and I noticed 
two points :

- "modern" web framework use conventions to make new developer use the 
framework quickly and write less code/conf
- direct use of model objects to get user inputs seems acceptable, even 
if loosing the form-bean "firewall" function.

I've quickly looked at Stripes, and noticed the main technical 
difference (expect use of java5 annotations) with Struts comes from the 
Struts RequestProcessor lyfecycle :
- it requires Actions to extend "Action",
- form-beans must extends "ActionForm",
- populate formbean occurs before validation, so it's requiresd ot be 

Creating an alternative RequestProcessor may drop those limitations. To 
make Struts work similar to Stripes, it would require :

1. use model beans as form-beans
Struts now can use form-bean not beeing ActionForm using 
"BeanValidatorForm" wrapper, but it still require type-safe form-bean 
population. I've searched a way to override population and collect 
conversion errors as a "first level validation", but did not find a way 
to bypass javabean Introspection without fully rewriting processPopulate.

2. action not beeing singleton anymore.
I've overriden processActionCreate to get action beans from a Spring 
context (and fall back to standard action creation)

3. invoke an "event" method.
I've write a small event caller Action that looks like a DispatchAction 
but does not require the "actionBean" to extend Action.

Did someone make similar experiments ?
I'd be interested in any suggestion that enables use of model beans as 
form-bean (using a BeanForm wrapper).



This message contains information that may be privileged or confidential and is the property
of the Capgemini Group. It is intended only for the person to whom it is addressed. If you
are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,
 distribute, or use this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.

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

View raw message