I'm not sure what you're asking for. The code I posted is the code
that would live in the LoginInterceptor, along with any other code you
have for checking for a valid session.
Tobin
> Tobin-could you forward what the LoginInterceptor interface would look like?
>
> Thanks
> Martin
On Friday 17 October 2008 16:53:03 Pierre Thibaudeau wrote:
> Is it possible, inside an interceptor, to "grab" the URL of the current
> request?
>
Yes. Take a look at
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor
and the following discussion which provides one way of
To: user@struts.apache.org
> Subject: Re: [S2] grabbing current URL in an interceptor
>
> Thank you, Nils and Tobin! Great explanations and suggestion! Thanks!
>
> Nils wrote:
>
> > The ActionProxy has methods for accessing the name, namespace and
> > method of the action, an
Thank you, Nils and Tobin! Great explanations and suggestion! Thanks!
Nils wrote:
> The ActionProxy has methods for accessing the name, namespace and
> method of the action, and the ActionInvocation has a method for
> accessing the ActionProxy. The ActionInvocation also has a method for
> acces
One other option that I've used with great success is to create a
@LoginNotRequired annotation. Then, just checked for that annotation
in your interceptor. I have done it where you can put the annotation
on the class (which affects all action methods in the class) or just
on the method (which onl
The ActionProxy has methods for accessing the name, namespace and
method of the action, and the ActionInvocation has a method for
accessing the ActionProxy. The ActionInvocation also has a method for
accessing the ActionContext, which in turn you can use to get the
parameters.
Nils-H
On Sat, Oct
Thanks Nils. Though, to be honest, it doesn't really help since my previous
post in this thread (and the question it asks) was based on a reading of
those very links...
;)
I hit the same wall: how to extract from an ActionInvocation (or an
ActionContext) the namespace, the name and the parameter
Maybe these links will help:
http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionInvocation.html
http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionProxy.html
Nils-H
On Fri, Oct 17, 2008 at 7:43 PM, Pierre Thibaudeau
<[EMAIL PROTECTED]> wr
>
> > Instead of the uri, the action name, method and namespace called would be
> > better.
> > In this way the same can be applied to portlets too. So i would like to
> > enhance your original thread question.
>
> I belive this can be obtained from the action invocation.
>
I believe so too, but I
> Instead of the uri, the action name, method and namespace called would be
> better.
> In this way the same can be applied to portlets too. So i would like to
> enhance your original thread question.
I belive this can be obtained from the action invocation.
Nils-H
--
Am Freitag, 17. Oktober 2008 15:53:03 schrieb Pierre Thibaudeau:
> Suggestions?
Yes but more to your question.
Instead of the uri, the action name, method and namespace called would be
better.
In this way the same can be applied to portlets too. So i would like to
enhance your original thread q
Is it possible, inside an interceptor, to "grab" the URL of the current
request?
The typical scenario for why I would like to be able to do that:
1) A user is about to perform MyRestrictedAction, but (say) the user lacks
authentication for that particular action.
2) CheckUserAuthenticatedIntercep
12 matches
Mail list logo