You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by ba...@icontel.com on 2009/09/04 09:57:17 UTC

Unabe to session timeout

      HI,

Yesterday I downloaded latest source from trank and build using mavan
and placed jars from sample web application into my application.

I am trying to set session time to my desired milliseconds as following
in main section of ShiroFilter (in web.xml) but it showing session time
as default 30min.

 

[main]

      realmA = com.xxx.bbb.aaa.fff.ff.mydao

      securityManager = org.apache.shiro.web.DefaultWebSecurityManager

      sessionManager =
org.apache.shiro.web.session.DefaultWebSessionManager

      sessionManager.globalSessionTimeout = 300000

      securityManager.sessionManager = $sessionManager

 

Please help me to set session timeout.

 

Thanks &Regards

Balajee

Re: Unabe to session timeout

Posted by Les Hazlewood <lh...@apache.org>.
You need to specify the session mode property.  This works (using a
test timeout of 10 seconds):

[main]
securityManager.sessionMode = native
securityManager.globalSessionTimeout = 10000
realmA = com.xxx.bbb.aaa.fff.ff.mydao

Setting sessionMode to 'native' will automatically enable the
DefaultWebSessionManager by default - no need to specify it.

And 10 seconds after a login, I saw that I was being redirected to the
login page because my session had timed out.

Cheers,

Les

On Fri, Sep 4, 2009 at 3:57 AM,  <ba...@icontel.com> wrote:
>       HI,
>
> Yesterday I downloaded latest source from trank and build using mavan and
> placed jars from sample web application into my application.
>
> I am trying to set session time to my desired milliseconds as following in
> main section of ShiroFilter (in web.xml) but it showing session time as
> default 30min.
>
>
>
> [main]
>
>       realmA = com.xxx.bbb.aaa.fff.ff.mydao
>
>       securityManager = org.apache.shiro.web.DefaultWebSecurityManager
>
>       sessionManager = org.apache.shiro.web.session.DefaultWebSessionManager
>
>       sessionManager.globalSessionTimeout = 300000
>
>       securityManager.sessionManager = $sessionManager
>
>
>
> Please help me to set session timeout.
>
>
>
> Thanks &Regards
>
> Balajee