• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to see sessions in my tomcat hosts

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I created an host for me sub-domain sample:

test.mysite.com

but when I logon in tomcat admin it list all applications for localhost host.

there is some way show has many session my host have.

I need it because when update my production environment I not can't stop tomcat before see there is some user.

thanks a lot.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be able to use the Manager application so that it looks at that host only. Try a URL like:

http://test.mysite.com/manager/html/list

It should show the number of sessions for each web application.

Bill
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat manager applications are 'by Host' so, if you've set up a host other then localhost in your server.xml file, you may need to install another copy of the manager application.

If this is really important to you, you might want to add a component to your application that shows a little more than the Tomcat manager, which only shows how many sessions per app are open.

I have a sample application on my site that shows how to see more information about each session, like, how long it's been idle, who is logged in, and the last page that that user hit.

http://simple.souther.us
Look for SessionMonitor
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tomcat manager applications are 'by Host'



Hmm - well, in my Tomcat 5.5.9 installation there is only one "tomcatxx/server/webapps/manager" directory and I have 5 different Hosts defined. I can start a manager session for each Host with no problem.

Bill
 
Alex Florentino
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it not works... my host definition:
my tomcat is 4.1



I got error: HTTP Status 404
[ August 30, 2007: Message edited by: Alex Florentino ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by William Brogden:


Hmm - well, in my Tomcat 5.5.9 installation there is only one "tomcatxx/server/webapps/manager" directory and I have 5 different Hosts defined. I can start a manager session for each Host with no problem.

Bill



This has changed between 5.0 and 5.5.
I haven't set up multiple hosts since using 5.0
From: http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html

If you have Tomcat configured to support multiple virtual hosts (websites) you would need to configure a Manager for each.



Alex:
This is also the case for your version (4.1)
See this link for configuring the manager application for your host:
http://tomcat.apache.org/tomcat-4.1-doc/manager-howto.html
[ August 30, 2007: Message edited by: Ben Souther ]
 
Alex Florentino
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, it is works.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic