Thanks Chris - that pointer is very helpful.

Can you clarify by setting session-timeout to 0, implies after 60 seconds 
the session will expire or does it imply the same as -1, that sessions 
will not timeout?

<session-config>
    <session-timeout>0</session-timeout>
</session-config>

Theo



From:   Christopher Schultz <ch...@christopherschultz.net>
To:     Tomcat Users List <users@tomcat.apache.org>, 
Date:   01/09/2015 17:23
Subject:        Re: Tomcat 8 Session Timeout



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Theo,

On 9/1/15 4:29 AM, theo.swe...@avios.com wrote:
> Mark - I took a look at the Manager How To Guide  as seen here -
> 
> https://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Expire_Ses
sions
>
>  It mentions that it's possible to expire sessions for each
> individual app using a command similar to -
> 
> curl -X GET 
> http://username:password@localhost:8080/manager/text/expire?path=/exam
ples&idle=0
>
>  Do you know if a wildcard can be used for the app name?

You can't.

If you want to script it, you can write some code to pull the list of
sessions and then interrogate them for various things. I'm not sure
what the manager application's interface is willing to cough-up, but
if you use JMX (either directly or via the manager's JMXProxyServlet),
you can list the sessions, look at their attributes, and expire them
using whatever criteria you want.

Check out slide 40 in this presentation from ApacheCon NA 2015:
http://events.linuxfoundation.org/sites/events/files/slides/Monitoring%2
0Apache%20Tomcat%20with%20JMX_0.pdf

This trick requires that you have an attribute in the session called
"user" that has the user's username in the toString() output. It's
just an example, but you can see how you can grab sessions and do
things with them.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJV5dDTAAoJEBzwKT+lPKRYRIUQAIuCucb4uj6o9uyr6CD/N+Yh
9NDAedOdxygaR14+uy8vHPB/V60O65bURSArFt65oNIB0U0YIA5A7/dpp+8NNWLE
O31mJu9GPLb5X1RdArRV8esiI23QRkZWNtEuNPn1pVcVwMMmfym+NzX1N1Ng9Sdu
Tkkom3GKf4MXujl4UqqiGEgy1nnSvmRUUoRAdGRsEWamz5GgfjFT6TIhmy+RBDxy
Doh4iRxDNO9g0yMHL/SWxOssEh+unJCcFKEJEo2nsRkh4MjsOkmVlyzWHiXkC/IZ
P+815UQjxgwPX+xQq2U3ptghj+SS3MJGKm2HuihF/ia+0xT7+0V0l1Oo8+H7y4Br
4Jf9FO9hfan9W0pnqi9U0tg3Ojthl8m1Q9nucU+v6CbGYUU5RExqaJBATU46wuda
PvDCP8MkVmYGGPNnUDDi9RIw9dggKC/FPm//iLLSBeHKZMfN1PXBViQOZVbj3X84
Dc1RU7c7F1OfuXCcAb2koQJjDGmgxr7KF8mPtNdzq+dSUeVDn1L2JZziXJ6MICVp
xrlslFSZ7iCUgpuc1+/FX99jG+CvxBj4v+LDgMlw1VEkqxeqg7V5HO5T4KhdHXZ2
IjjlUMsEUtsmIrF00EXyW/gXGyl15Nzn6ULEPFwnm4nUf0vEUVoWyjdBsXWaAo5O
N8okIJvNcDxwaQWBWm7w
=epgx
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

-----------------------------------------------------------------------------------------------------------------------------------------
The Mileage Company Limited is a limited company registered in England under 
company number 2260073 whose registered office address is at
Astral Towers, Betts Way, London Road, Crawley, West Sussex, RH10 9XY.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify the 
system manager.

This footnote also confirms that this email message has been swept by Mimecast 
for the presence of computer viruses. 
-----------------------------------------------------------------------------------------------------------------------------------------

Reply via email to