struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Nenning <>
Subject Re: [GitHub] struts pull request: WW-4540: Strict DMI
Date Wed, 23 Sep 2015 14:03:45 GMT
> > I was wondering why the method was not blocked in Greg's sample. I 
> > to reproduce his case based on Ɓukasz' sample app. But no luck.
> >
> > With <s:submit action="" /> the framework never invoked the action
> > specified there. It was always the form-action and it's execute() 
> You must enable DMI
> <constant name="struts.enable.DynamicMethodInvocation" value="true"/>
> configuration.html#ActionConfiguration-DynamicMethodInvocation

It is enabled. Other ways to invoke methods do work, like a parameter with 
'method:' or adding !method to the URL. The test project is based on this:

Things that I changed:
- added a member 'String text' to HelloAction, along with getter/setter
- added a method 'doSave' to HelloAction, which also uses SUCCESS result 
but adds an ActionMessage
- added textfield 'name=text' to hello.jsp
- added button to hello.jsp and played with different action="" and 
method="" attributes

For example <s:submit method="doSave" /> does what expected (invokes 
But <s:submit action="hello!doSave" /> does not (invokes 


This Email was scanned by Sophos Anti Virus

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message