A documentation page for Tomcat 6 at http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Session%20Statistics allows for the following command to be used in the manager: http://localhost/manager/sessions?path=/ This used to work in Tomcat 5. In Tomcat 6, the following error is returned: FAIL - Unknown command /sessions I have created two different installations of Tomcat 6.0.14 (one on CentOS 5, and one on Fedora 7). Both installations exhibit the same failure.
The manager API has changed at 6.0.x ! Currently only the HTMLManagerServlet /manager/html/sessions is supported. :-) I hope Remy or Rainer can help Peter
Re-opened as at a minimum, the docs need to be updated.
It's frustrating when functionality like this simply disappears when moving to a newer version. We have scripts that monitor our tomcat servers using the sessions command. (We use 'curl' to get the results, and then process the information.) The "text" version of this command worked great, and served our purpose. Sadly, the html version referenced above does not provide the same information (session information broken down in ten-minute ranges).....even after sifting through the HTML formatting.....something you don't want when using a commandline tool like curl. {grumble} {sigh}
OK, I talk with Rainer to make a port from tomcat 5.5!
Looking at the svn history, the functionality is still there it is just that the command name changed (to expire) when additional functionality was added to enable sessions to be expired. I have added back the sessions command but marked it as deprecated as it may well be removed in a future version. The fix has been committed to svn and proposed for 6.0.x
In TC 6 the HTML manager got a new feature behind the command "sessions". It lists individual sessions and allows to invalidate individual sessions, remove attributes etc. This is feature A. Somehow parallel in time I saw, that the old sessions feature (session statistics by maxInactiveInterval) was pretty useless, in most cases maxInactiveInterval is constant for all sessions in one context. So I wrote a somewhat more useful thing, namely a session statistic by idle time. This is feature B. Unfortunately when I wanted to commit the new thing, the HTMLManager already had the new sessions feature A under the name "sessions". I decided to put B in ManagerServlet and HTMLManagerServlet under a consistent name, now using "expire" instead of "sessions". With your latest commit, "sessions" is back to the ManagerServlet, but it does B, whereas in HTMLManagerServlet it does A. This is correct with respect to backwards compatibility but a little confusing.
This has been applied to 6.0.x and will be included in 6.0.17 onwards.