You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Lukasz Lenart <lu...@apache.org> on 2014/04/22 08:57:55 UTC
HttpMethodInterceptor
Hi,
During Easters I have developed such a thing, it's possible to limit
access to given action based on request type, ie. @GetOnly, @PostOnly
and @AllowedHttpMethod({GET, POST, PUT}), wdyt?
https://issues.apache.org/jira/browse/WW-4328
I'm going prepare a PR (which is a better way to perform review) as
soon repo will be synced
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: HttpMethodInterceptor
Posted by Lukasz Lenart <lu...@apache.org>.
2014-04-22 9:26 GMT+02:00 Umesh Awasthi <um...@gmail.com>:
> Nothing against Interceptor :)
> Just method level annotation will give more readability (my assumption)
>
> I would love to have an interceptor and a method level annotations.But I
> believe it is a matter of choice only.
But you have, you can annotate whole Action or just one method - up to you :-)
And interceptors are easier to manage, you can always prepare your own
stack with the interceptor you use in your app - btw. it's the
preferred way :-)
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: HttpMethodInterceptor
Posted by Umesh Awasthi <um...@gmail.com>.
Nothing against Interceptor :)
Just method level annotation will give more readability (my assumption)
I would love to have an interceptor and a method level annotations.But I
believe it is a matter of choice only.
On Tue, Apr 22, 2014 at 12:50 PM, Lukasz Lenart <lu...@apache.org>wrote:
> 2014-04-22 9:15 GMT+02:00 Umesh Awasthi <um...@gmail.com>:
> > Have not worked much with convention plugin. Do we have anything like
> above
> > at method level inside actions?
> > Something like method={RequestMethod.GET, RequestMethod.POST}
> >
> > I have used such convention in Spring-MVC and it seems good and seems
> more
> > Readableto me.
>
> You can annotate methods as well, Interceptor will discover that too.
>
> > I would love to have such option in convention plugin than Interceptor.
>
> Why not Interceptor?
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
Re: HttpMethodInterceptor
Posted by Lukasz Lenart <lu...@apache.org>.
2014-04-22 9:15 GMT+02:00 Umesh Awasthi <um...@gmail.com>:
> Have not worked much with convention plugin. Do we have anything like above
> at method level inside actions?
> Something like method={RequestMethod.GET, RequestMethod.POST}
>
> I have used such convention in Spring-MVC and it seems good and seems more
> Readableto me.
You can annotate methods as well, Interceptor will discover that too.
> I would love to have such option in convention plugin than Interceptor.
Why not Interceptor?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: HttpMethodInterceptor
Posted by Umesh Awasthi <um...@gmail.com>.
Have not worked much with convention plugin. Do we have anything like above
at method level inside actions?
Something like method={RequestMethod.GET, RequestMethod.POST}
I have used such convention in Spring-MVC and it seems good and seems more
Readableto me.
I would love to have such option in convention plugin than Interceptor.
On Tue, Apr 22, 2014 at 12:27 PM, Lukasz Lenart <lu...@apache.org>wrote:
> Hi,
>
> During Easters I have developed such a thing, it's possible to limit
> access to given action based on request type, ie. @GetOnly, @PostOnly
> and @AllowedHttpMethod({GET, POST, PUT}), wdyt?
>
> https://issues.apache.org/jira/browse/WW-4328
>
> I'm going prepare a PR (which is a better way to perform review) as
> soon repo will be synced
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
Re: HttpMethodInterceptor
Posted by Lukasz Lenart <lu...@apache.org>.
PR for review
https://github.com/apache/struts/pull/8
2014-04-22 8:57 GMT+02:00 Lukasz Lenart <lu...@apache.org>:
> Hi,
>
> During Easters I have developed such a thing, it's possible to limit
> access to given action based on request type, ie. @GetOnly, @PostOnly
> and @AllowedHttpMethod({GET, POST, PUT}), wdyt?
>
> https://issues.apache.org/jira/browse/WW-4328
>
> I'm going prepare a PR (which is a better way to perform review) as
> soon repo will be synced
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org