> > I was wondering why the method was not blocked in Greg's sample. I tried > > 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() method. > > You must enable DMI > > <constant name="struts.enable.DynamicMethodInvocation" value="true"/> > > https://struts.apache.org/docs/action- > 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: https://github.com/lukaszlenart/struts2-convention.git 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 HelloAction.doSave()). But <s:submit action="hello!doSave" /> does not (invokes HelloAction.execute()). Regards, Christoph This Email was scanned by Sophos Anti Virus