assuming this configuration in struts.xml
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="staticParams">
<param name="parse">true</param>
<param name="overwrite">false</param>
</interceptor-ref>
<result name="success">good_result.ftl</result>
</action>
init params would populate parameters (Map) as in this example
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor @Override
public String intercept(ActionInvocation invocation) throws Exception
{
ActionConfig config = invocation.getProxy().getConfig();
Object action = invocation.getAction();
final Map<String, String> parameters = config.getParams();
java.util.Iterator iter= parameters.values().iterator();
while(iter.hasNext()
{
Object obj=iter.next();
System.out.println("key="+obj);
System.out.println("value = "+parameters.get(obj));
}
does the xml example above conform to your schema?
Martin Gainty
______________________________________________
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, 24 Aug 2009 17:17:46 -0600
> From: [email protected]
> Subject: S2: reading POST body w/in action
> To: [email protected]
>
> Hello All,
>
> I'm trying to read the body of a POST, e.g. XML content, w/in an
> Action. Problem seems to be protecting it from the
> ParametersInterceptor so that the body of the request is not treated as
> key-value pairs.
>
> Can someone please help me with this?
>
> Thanks!
>
> --john
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
_________________________________________________________________
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1