You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christoph Nenning <Ch...@lex-com.net> on 2013/09/30 16:51:15 UTC
Re: strict DMI, was: Url rewriting of .action to .jsp
> >> > But still: method:add works while !add does not.
> >>
> >> If you could prepare a small demo app, I'd like investigate that.
> >>
> >>
> >
> > I can do so next week, sorry for the delay
>
> No problem, I'm busy too ;-)
>
>
Finally I continued with my strict DMI tests.
While creating a sample app I discovered that the above was wrong. It is a
CSRF protection interceptor in the other app which made me think that !add
was blocked by the framework.
But I could not get strict DMI working at all. Only execute() got invoked,
no matter what I tried.
Would you please have a look at the sample app and tell me what I am doing
wrong?
https://github.com/wolpi/struts2-samples/tree/master/dmiandactionmappingtest
Next question is: how to use strict DMI with convention plugin?
Regards,
Christoph
This Email was scanned by Sophos Anti Virus
Re: Re: strict DMI, was: Url rewriting of .action to .jsp
Posted by Lukasz Lenart <lu...@apache.org>.
Done
https://cwiki.apache.org/confluence/display/WW/Action+Configuration#ActionConfiguration-DynamicMethodInvocation
2013/10/1 Christoph Nenning <Ch...@lex-com.net>:
>> >
>> > Would you please have a look at the sample app and tell me what I am
> doing
>> > wrong?
>> >
>> >
> https://github.com/wolpi/struts2-samples/tree/master/dmiandactionmappingtest
>
>>
>> <constant name="struts.enable.DynamicMethodInvocation" value="true"/>
>>
>> It must be true, if false whole DMI logic is off.
>>
>> <action name="hello"
>> class="struts2.samples.dmiandactionmappingtest.actions.HelloAction">
>>
>> Removed method={1} as you don't use "*" mapping
>>
>> <allowed-methods>add</allowed-methods>
>>
>> In this way you define allowed methods.
>>
>
> Okay, now even I understand it, thanks a lot.
>
> Would you mind adding that sample struts.xml in the wiki, that I can find
> it next time I need it?
>
>
>> > Next question is: how to use strict DMI with convention plugin?
>>
>> Not yet, I will add it soon.
>>
>>
>
> Looking forward to it
>
>
> Regards,
> Christoph
>
> This Email was scanned by Sophos Anti Virus
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Antwort: Re: strict DMI, was: Url rewriting of .action to .jsp
Posted by Christoph Nenning <Ch...@lex-com.net>.
> >
> > Would you please have a look at the sample app and tell me what I am
doing
> > wrong?
> >
> >
https://github.com/wolpi/struts2-samples/tree/master/dmiandactionmappingtest
>
> <constant name="struts.enable.DynamicMethodInvocation" value="true"/>
>
> It must be true, if false whole DMI logic is off.
>
> <action name="hello"
> class="struts2.samples.dmiandactionmappingtest.actions.HelloAction">
>
> Removed method={1} as you don't use "*" mapping
>
> <allowed-methods>add</allowed-methods>
>
> In this way you define allowed methods.
>
Okay, now even I understand it, thanks a lot.
Would you mind adding that sample struts.xml in the wiki, that I can find
it next time I need it?
> > Next question is: how to use strict DMI with convention plugin?
>
> Not yet, I will add it soon.
>
>
Looking forward to it
Regards,
Christoph
This Email was scanned by Sophos Anti Virus
Re: strict DMI, was: Url rewriting of .action to .jsp
Posted by Lukasz Lenart <lu...@apache.org>.
2013/9/30 Christoph Nenning <Ch...@lex-com.net>:
> Finally I continued with my strict DMI tests.
>
> While creating a sample app I discovered that the above was wrong. It is a
> CSRF protection interceptor in the other app which made me think that !add
> was blocked by the framework.
>
>
> But I could not get strict DMI working at all. Only execute() got invoked,
> no matter what I tried.
>
>
> Would you please have a look at the sample app and tell me what I am doing
> wrong?
>
> https://github.com/wolpi/struts2-samples/tree/master/dmiandactionmappingtest
<constant name="struts.enable.DynamicMethodInvocation" value="true"/>
It must be true, if false whole DMI logic is off.
<action name="hello"
class="struts2.samples.dmiandactionmappingtest.actions.HelloAction">
Removed method={1} as you don't use "*" mapping
<allowed-methods>add</allowed-methods>
In this way you define allowed methods.
> Next question is: how to use strict DMI with convention plugin?
Not yet, I will add it soon.
Regards
--
Ćukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org