Custom JSP taglib. Lets you create temporary directories and files. All such objects will be deleted automatically, as soon as session is closed (invalidated).
You can place objects in the temporary area provided by your container (as per Servlets API 2.2) or directly provide a path for directory (file). You can describe name for created objects or tags will generate some unique names. Result of operation (an absolute path for directory or file) will be printed or saved in new page scope variable.
For example:
the same for files:
Tags are:
CreateTempDirectory
Creates temporary (auto-deleted) directory. Parameters are:
1) path Optional parameter. Describes a path for directory,
where temp object will be created. Without this parameter tag uses temporary area defined
by container.
2) name Optional parameter. Describes name for directory.
Without this parameter some unique name will be generated.
3) id Optional parameter. Describes name
for page scope variable. An absolute path for new object will be saved here.
Type is java.lang.String. Without this parameter tag just prints data.
CreateTempFile
Creates temporary (auto-deleted) file. Parameters are:
1) path Optional parameter. Describes a path for directory,
where temp object will be created. Without this parameter tag uses temporary area defined
by container.
2) name Optional parameter. Describes name for file.
Without this parameter some unique name will be used.
3) id Optional parameter. Describes name
for page scope variable. An absolute path for new object will be saved here.
Type is java.lang.String. Without this parameter tag just prints data.
for downloading:
Library: temptag.jar Description: taglib.tld
See also Coldtags suite - the largest collection of custom JSP tags.