//the struts-convention-plugin allows you to supply your own params e.g.
public class HelloWorld extends ActionSupport {
@Action(value="/different/url",
result...@result(name="success", type="httpheader", params={"status",
"500", "errorMessage", "Internal Error"})}
http://cwiki.apache.org/WW/convention-plugin.html
does this help?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est
interdite. Ce message sert à l'information seulement et n'aura pas n'importe
quel effet légalement obligatoire. Étant donné que les email peuvent facilement
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité
pour le contenu fourni.
> Date: Mon, 6 Apr 2009 14:34:08 -0400
> From: [email protected]
> To: [email protected]
> Subject: Struts 2/Spring and @Required
>
> Hello All,
>
> One of the nice annotation features of spring is the ability to
> annotate injected fields with @Required so that you don't get null pointer
> exceptions. However, I can only seem to get this to work
> with my test cases (spring throws an error when a required field isn't set),
> but I can't get the same behavior on the startup of my struts 2 web app. Does
> anyone know if it's possible for the web-app
> to break when an @Required field isn't set at startup?
>
> Thanks,
> Tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
_________________________________________________________________
Rediscover Hotmail®: Get e-mail storage that grows with you.
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009