Link to home
Start Free TrialLog in
Avatar of thungrac01
thungrac01

asked on

How to get total current sessions in Struts?

Thanks in advance.
Avatar of jarasa
jarasa
Flag of Spain image

Which server are you using?
Normally that should be done by server console maintenance.
Javier
Avatar of thungrac01
thungrac01

ASKER

I use WebSphere 5.0
Well Weblogic has a console where you can see all that info I bet Websphere does have one too, let me check it out.

Javier
Not sure if this is what you need, sorry I'm a WebLogic User.

http://www-306.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06060001.html#nav

Javier
ASKER CERTIFIED SOLUTION
Avatar of jarasa
jarasa
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I guess it should be stated: struts has no capability for this.  You would need to write your own bean tailored to your app server to find the number of sessions and then you could use struts to output the value (if you want.)

SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry to searlas. Your answer is also valid but I couldn't do a three-way split on a 50 points solution.
IMHO  My link pointed to the only solution.  rrz
My vote goes to give the points to rrz, I feel bad for the other one you gave me the points and I said it should be deleted, but if not is shoulded been a split, so you can acept this one to rrz now. Girionis.

Javier
rrz, IMHO your solution (that entire thread) has nothing to do with Struts.
rrz@871311, I believe jarasa's and searlas' comments are also valid.

jarasa's because he provided a websphere specific solution, which is still valid since the asker said he is using websphere.

searlas' since he stated that there is no default capability of doing it and that the asker would have to write his own library.

jarasa, if you still believe that you are not worth the points I can ask a moderator to do a split between rrz and searlas.
go ahead girionis
But I didn't say I worth THIS points but THIS ones :c))
https://www.experts-exchange.com/questions/20930071/How-will-I-save-my-JSP-Page-into-MS-Excel.html#11215942
Javier
The user accepted your comment anyway :)
opps I thought it was EE who did, well then do whatever here, is ok for me, give it to rrz and searlas
Javier
>rrz, IMHO your solution (that entire thread) has nothing to do with Struts.  
I agree, searlas.  
But IMHO this question has nothing to do with Struts. Struts is a framework which sits on top of the app server. It is the app server which is capable of counting HttpSessions (HttpSessionListener).
You posted,
>I guess it should be stated: struts has no capability for this.  

This is my opinion, but I will accept the decision of the majority. I am only here to learn.
rrz
Well that's why I say my answer has nothing to solve on the question title, but it's solves the problem I guess, the strictly asnwer to the question should be searlas, as long as the user didn't accept any.

Searlas said thre truth: You can't get user sessions in Struts, but
rrz gave a code solution: to get it on any webserver.

mine just was to point him to the server console, so give it to them girionis, pls.

hehe.

Javier