Custom JSP taglib. You can use this taglib with Sessions listener from JSOS. Listener collects statistics for sessions (how many sessions are active, what was the peak value for active sessions, total counter for sessions, minimal, maximal and average life time for sessions) and this taglib lets you use accumulated data in your JSP files.
How to use it:
At the first hand you have to install filter (listener) for sessions statistics. See Sessions statistics in JSOS package.
After that you may use an appropriate custom tag in your JSP page. For example:
Tags are:
CurrentCounter
Counts active (open) sessions. Parameters are:
1) id Optional parameter. Describes a name for page scope variable (type is java.lang.Long). Data will be saved in this variable. Without this parameter tag just prints data.
TotalCounter
Counts all (historically) opened sessions. Parameters are:
1) id Optional parameter. Describes a name for page scope variable (type is java.lang.Long). Data will be saved in this variable. Without this parameter tag just prints data.
PeakCounter
Keeps maximal value for simultaneously opened sessions. Parameters are:
1) id Optional parameter. Describes a name for page scope variable (type is java.lang.Long). Data will be saved in this variable. Without this parameter tag just prints data.
MinLifeTime
Keeps minimal life time for sessions (in seconds). Parameters are:
1) id Optional parameter. Describes a name for page scope variable (type is java.lang.Long). Data will be saved in this variable. Without this parameter tag just prints data.
MaxLifeTime
Keeps maximal life time for sessions (in seconds). Parameters are:
1) id Optional parameter. Describes a name for page scope variable (type is java.lang.Long). Data will be saved in this variable. Without this parameter tag just prints data.
AvgLifeTime
Keeps average life time for sessions (in seconds). Parameters are:
1) id Optional parameter. Describes a name for page scope variable (type is java.lang.Long). Data will be saved in this variable. Without this parameter tag just prints data.
for downloading:
Library: sesslist.jar Description: taglib.tld
See also Coldtags suite - the largest collection of custom JSP tags.