SkipPage taglib ver. 1.6

    Custom JSP tag. Tag SkipPage just skips the rest of your page. You may use it when you need to stop page proceedings. Tag also outputs own body before the interruption. Tag SkipPost lets you skip the execution in case of HTTP POST requests, tag SkipBot skips the page for the incoming requests originated from the bots (e.g. Google search bot, Yahoo bot etc.). For example:
 

<%@ taglib uri="taglib.tld" prefix="skip" %>
<html>
...
<skip:SkipPage />
<!-- skip all the code below -->
...
</html>

or output error message:
 

<%@ taglib uri="taglib.tld" prefix="skip" %>
<html>
...
<skip:SkipPage>could not proceed</skip:SkipPage>
<!-- skip all the code below -->
...
</html>

Tags are:

SkipPage

Stops page execution. Parameters are:

1) cond Optional attribute. Describes a boolean expression. If this expression is true than page processing will be stopped. Default value is true.
2) clear Optional attribute. Possible values are true or false. If this value is true than output buffer will be cleared also. Default value is false.
3) status Optional attribute. Describes a status code for the canceled response.

SkipPost

Stops page execution in case of HTTP POST request. Parameters are:

1) cond Optional attribute. Describes a boolean expression, tag's behavior depends on. Default value is true (stop the execution).

SkipBot

Stops page execution for the requests from bots. Parameters are:

1) cond Optional attribute. Describes a boolean expression, tag's behavior depends on. Default value is true (stop the execution).

for downloading:

 Library: skiptag.jar     Description: taglib.tld

 © Coldbeans      Comments?

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

Also in Coldtags: