Secure link taglib ver. 1.2

    You may use this custom JSP taglib together with Secure Link package. Taglib used to deal with secure links (add, delete, list). For example:
 


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

<s:addLink source="/a/12345678.jsp" target="/mypage.jsp" seconds="600"/>

In this case all requests to /a/12345678.jsp will be forwarded to /mypage.jsp and the source link will be valid for 10 minutes.

Also you can print existing links:
 


<s:forEachLink>
 Source URI:<%=sourceURI%>
 Target URI:<%=targetURI%>
 Created:<%=created%>
 Expired:<%=expired%>
 Hits to date:<%=hits%>
 Alloved hits:<%=maxHits%>
</s:forEachLink>

Tags are:

addLink

Tag creates a new link. Parameters are:

1) source describes a source URI
2) target Optional parameter. Describes a target URI if your link is virtual. The incoming request will be forwarded to this address.
3) maxCount Optional parameter. Describes a value for the allowed hits (The source URI will be valid for this amount of hits maximum)
4) seconds Optional parameter. Describes a time to live for the source link in seconds
5) expired Optional parameter. Describes an expiration date for the source link (as java.util.Date or java.util.Calendar)

removeLink

Tag removes existing link. Parameters are:

1) source describes a source URI

forEachLink

Body tag executes own body for the each exiting link. Parameters are: none

Within the body of this tag you may use nested variables describes the current link:
sourceURI type is java.lang.String describes a source URI
targetURI type is java.lang.String describes a target URI
created type is java.util.Date describes a creation date
expired type is java.util.Date describes an expiration date
hits type is java.lang.Long keeps a counter
maxHits type is java.lang.Long describes a maximal value for the counter

for downloading:

Library: securelinkflt.jar    Description: taglib.tld

© Coldbeans      Comments?

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