Session size tag ver. 1.2


    Custom JSP tag. Tag SessionSize calculates the size (in bytes) for HTTP session. You may use this tag in two forms:

1) just print the calculated value
 

<%@ taglib uri="taglib.tld" prefix="get" %>
<html>
<p><i> Session size is:</i> <get:SessionSize />
</html>

2) print nothing, but create a variable (page scope, type is java.lang.Integer) initialized by the calculated value. You may use this variable later in your scriptlets:
 

<%@ taglib uri="taglib.tld" prefix="get" %>
<html>
<get:SessionSize id="var_name"/>
<br>Size is  <%=var_name%> bytes
<%
    int size=var_name.intValue();
    ....
%>
</html>

Here the parameter id describes your page scope variable. E.g. in the above mentioned example variable's name is var_name.

Tags are:

SessionSize

Calculates the size for HTTP session. Parameters are:

1) id Optional parameter. Describes a name for the page scope variable (type is java.lang.Integer). Without this parameter tag just prints data.
 

for downloading:

 Library: ssizetag.jar     Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

     

Also in JSOS: