Last wish taglib ver. 1.4

    Custom JSP taglib. Tag lastWish lets you associate some action (method's call) with session closing. So you can for example free some resources, remove your beans etc. You have to provide some object and its method that should be called.

For example:
 


<%@ taglib uri="taglib.tld" prefix="do" %>

<!-- open some file -->
<%
   java.io.File f=new java.io.File("my_file.txt");
   ...
%>
<!-- delete it at the end of user session -->
<do:lastWish object="<%=f%>" method="delete"/>

here f.delete() call will be executed at the end of session life time. So this tag will simply perform file delete operation.

Tags are:

lastWish

Custom tag lets you plan some action (method's call) after session closing. Parameters are:

1) object describes your object
2) method Optional parameter. Describes a name for called method (public finction without parameters). Default value is close
3) cond Optional parameter. Describes a boolean value tag's behavior depends on. Default value is true (add action).

for downloading:

Library: lastwish.jar    Description: taglib.tld

© Coldbeans      Comments?

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

Also in Coldtags: