You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by "jim.piersol@gmail.com" <ji...@gmail.com> on 2016/11/14 16:25:33 UTC

Shiro using default Tomcat Web Session Mgmt.

Does anyone use Tomcat 8 with Tomcats Session Mgmt?  I have been unable to
make it work.  Everything works fine with Jetty, but when running under
Tomcat, even though correct JSESSIONIDs are passed, Shiro doesn't recognize
session and assumes I need to login again.

If I use Shiro Native Web Session Mgmt, it does work fine.

My issue is that I need to use Apache mod_proxy infront of a group of Tomcat
servers.  Apache load balancing doesn't work with Shiros SessionID
generation (doesn't include the jvmRoute info like default Tomcat does),
thus Apache can't honor stickysessions.

I would love to switch back to Tomcat session mgmt, but I can't get anywhere
with it while using Shiro.  Can anyone that uses Tomcat assist?

Here is link to a previous thread I was using when doing initial Shiro
integration:
http://shiro-user.582556.n2.nabble.com/Shiro-rediecting-back-to-Login-after-successful-Login-td7581130.html



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Shiro using default Tomcat Web Session Mgmt.

Posted by I PVP <ip...@hotmail.com>.
One of the applications I  work with is running on Tomcat and relies on Shiro for all Authentication and Authorization.
Tomcat 9M13 + Shiro 1.3.2 +  Cassandra 3.9 (stores session data, authentication data and authorization data)

IPVP


On November 14, 2016 at 3:14:37 PM, jim.piersol@gmail.com (jim.piersol@gmail.com<ma...@gmail.com>) wrote:

Yes... I am not to the point of Clustering though. With nothing more then
1 Tomcat instance just running basic webapp using Shiro, Shiro doesn't work.
If I use exact same everything with a Jetty instance, then it works. Im
just trying to figure out if Tomcat works for anyone else.



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380p7581384.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Shiro using default Tomcat Web Session Mgmt.

Posted by "jim.piersol@gmail.com" <ji...@gmail.com>.
Yes...   I am not to the point of Clustering though.  With nothing more then
1 Tomcat instance just running basic webapp using Shiro, Shiro doesn't work. 
If I use exact same everything with a Jetty instance, then it works.  Im
just trying to figure out if Tomcat works for anyone else.



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380p7581384.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Shiro using default Tomcat Web Session Mgmt.

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
Well you should. Servlet spec says so. This is probably why it doesn't work. 

> On Nov 14, 2016, at 10:37 AM, "jim.piersol@gmail.com" <ji...@gmail.com> wrote:
> 
> No, web.xml is very straight forward.  Not trying to do anything out of the
> ordinary.
> 
> 
> 
> 
> 
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380p7581382.html
> Sent from the Shiro User mailing list archive at Nabble.com.
> 


Re: Shiro using default Tomcat Web Session Mgmt.

Posted by "jim.piersol@gmail.com" <ji...@gmail.com>.
No, web.xml is very straight forward.  Not trying to do anything out of the
ordinary.





--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380p7581382.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Shiro using default Tomcat Web Session Mgmt.

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
Are you using distributable directive in your web.xml by any chance?

> On Nov 14, 2016, at 10:25 AM, "jim.piersol@gmail.com" <ji...@gmail.com> wrote:
> 
> Does anyone use Tomcat 8 with Tomcats Session Mgmt?  I have been unable to
> make it work.  Everything works fine with Jetty, but when running under
> Tomcat, even though correct JSESSIONIDs are passed, Shiro doesn't recognize
> session and assumes I need to login again.
> 
> If I use Shiro Native Web Session Mgmt, it does work fine.
> 
> My issue is that I need to use Apache mod_proxy infront of a group of Tomcat
> servers.  Apache load balancing doesn't work with Shiros SessionID
> generation (doesn't include the jvmRoute info like default Tomcat does),
> thus Apache can't honor stickysessions.
> 
> I would love to switch back to Tomcat session mgmt, but I can't get anywhere
> with it while using Shiro.  Can anyone that uses Tomcat assist?
> 
> Here is link to a previous thread I was using when doing initial Shiro
> integration:
> http://shiro-user.582556.n2.nabble.com/Shiro-rediecting-back-to-Login-after-successful-Login-td7581130.html
> 
> 
> 
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>