Right, SMI is a new addition in Struts 2.5 and it's better to use it
instead of disabling, please read this
https://struts.apache.org/docs/action-configuration.html#ActionConfiguration-StrictMethodInvocation

2016-12-22 17:27 GMT+01:00 John Aylward <john.aylw...@sagenet.com>:
> Ok, I got it to work with an include file on 2.5.8. In my main struts.xml I 
> added this:
>
> <struts>
>
>         <!-- Max file upload size of 250 MB -->
>         <constant name="struts.multipart.maxSize" value="262144000" />
>
>         <constant name="struts.enable.DynamicMethodInvocation" value="FALSE" 
> />
>         <constant name="struts.strictMethodInvocation.methodRegex"
>                 value="([a-zA-Z]*)" />
>
>         <include file="my-json-actions.xml" />
> </struts>
>
>
> Then in my included file I had to set this:
> <struts>
>         <package name="my-json" namespace="/json" extends="struts-default"
>                 strict-method-invocation="false">
>
> The strict method invocation was preventing my actions from loading. 
> Disabling it allowed my wildcard actions to work again. I'm not sure if the 
> regex was needed or not, but I'm leaving it for now since it's working.
>
>
>
> --
> John J. Aylward
>
> -----Original Message-----
> From: John Aylward [mailto:john.aylw...@sagenet.com]
> Sent: Thursday, December 22, 2016 10:20 AM
> To: Struts Users Mailing List <user@struts.apache.org>
> Subject: RE: problem Migrating from Struts 2.3 to 2.5
>
> I combined all my struts.xml files into one and finally got a struts 
> configuration error after a bit of massaging to get rid of old elements that 
> I didn't need anymore and messed one up. At least I know the struts.xml file 
> is being loaded now. I know the actions are being found because I 
> purposefully made an error in the action section and it was properly reported.
>
> However, once I cleaned up my errors, my actions still appear to not be 
> loading, or perhaps they are loading in the wrong namespace.
>
> When I try to access my actions in a browser directly, I get this message:
> There is no Action mapped for namespace [/json] and action name 
> [ClientData!loggedIn] associated with context path [].
>
> I placed all my loaded files into the /json namespace:
>
>         <!-- Max file upload size of 250 MB -->
>         <constant name="struts.multipart.maxSize" value="262144000" />
>
>         <package name="my-json" namespace="/json" extends="struts-default"> 
> ...
>
> In the 2.3.x branch I would get log message when an action was configured, 
> but in 2.5.x I don't appear to get any such messages.
>
>
> --
> John
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org

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

Reply via email to