The Subject is created/bound and unbound to the thread before and
after request execution, respectively.  Is the ShiroFilter configured
to be before the Wicket Filter to ensure a Subject is available when
Wicket processes a request?

- Les

On Tue, Mar 16, 2010 at 2:21 PM, Fernando Wermus
<[email protected]> wrote:
> I think I succesfully set up shiro with my webapp. I confirm that a
> DefaultWebSecurityManager is instanciated by ShiroFilter which I have access
> through
>
> org.apache.shiro.mgt.SecurityManager s=SecurityUtils.getSecurityManager();
>
> But for some reason I got an exception when I tried to get the Subject with
> the following error,
>
> java.lang.IllegalStateException: ServletRequest is not available! A
> ServletRequest must be present in either the Subject context map, on an
> existing WebSubject or via the thread context. This exception is probably
> indicative of an erroneous application configuration.
>
> This is the instruction
>
> Subject currentUser = SecurityUtils.getSubject();
>
> If I can get SecurityManager through ShiroFilter, why did I get this
> exception ?
>
> thanks
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

Reply via email to