• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get Session count from container

 
Mamatha K S
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am doing some admin part of my web application.
So I want to get no of sessions, execution time etc for all sessions in a tomcat container.
"org.apache.catalina.session.ManagerBase" - This tomcat API gives methods to get information.
But I don't know how to associate this manager with the tomcat i am using.
please If any of you know about this please tell me.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this thread is specific to Tomcat...
Moving to the Apache/Tomcat forum.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I don't know how to associate this manager with the tomcat i am using.

Which version of Tomcat are you using?
In my copy of Tomcat5.5.9 the directory
CATALINA_HOME\server\webapps
contains admin, host-manager and manager applications which I can access online because I defined a user with the admin and manager roles.
Bill
 
Mamatha K S
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Tomcat 5.5.
Even I have manager and host manager application that I can access.

My requirement is : My application is running remotely. so I want to test how many sessions are creating and their execution time.
So I want to develop one Jsp page which gives me this info. Then this page i will deploy in a server where my application is running. Then I want use some tools like Wget which retrives that page thru HTTP.

Like this I can get session related information....

I am trying to use apache tomcat API..

but i am not getting how to use it..
I hope u can understand..

Thanks,
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Mamatha K S",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the management interface works you should be able to get the results of any manager command as a text stream with a simple URL. See this documentation.
Seems to me that parsing this text stream will be simpler than your proposed route through JSP.
Bill
[ July 17, 2006: Message edited by: William Brogden ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic