struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Karstens <darrenkarst...@gmail.com>
Subject Re: How to structure a struts2 application
Date Tue, 28 Sep 2010 08:02:46 GMT
Thanks for the responses. The validation interceptor seems to be
exactly what I was looking for.
Regards
Darren

> You don't need multiple classes. The validate interceptor, as the prepare
> one, is very flexible in this sense. You can define multiple validate
> methods inside a single action class. Particularly, you could define a
> validate (prepare) method  for every entry point (for instance: update,
> delete, etc.).  You must only follow the convention: use updateValidate for
> validate method update, deleteValidate from delete entry point, and so on.
> Remember that validate/prepare method is always invoked (so you can put here
> common validation rule).
> Furthermore, you can encapsulate validation logic inside an xml file, alway
> following the conventions:
> <actionClass>-<actionAlias>-validation.xml
>
>
> Maurizio Cucchiara

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message