Package org.deltava.taglib.content
Class IPFilterTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.content.IPFilterTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
A JSP tag to filter content based on IPv4 or IPv6 addresses.
- Since:
- 5.2
- Version:
- 5.2
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Closes the tag.int
Determines whether to include content based on the IP address.void
release()
Releases the tag's state variables.void
setIPv4
(boolean show) Sets whether to show content to users accessing the page via IPv4.void
setIPv6
(boolean show) Sets whether to show content to users accessing the page via IPv6.Methods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
IPFilterTag
public IPFilterTag()
-
-
Method Details
-
setIPv4
public void setIPv4(boolean show) Sets whether to show content to users accessing the page via IPv4.- Parameters:
show
- TRUE if content should be displayed, otherwise FALSE
-
setIPv6
public void setIPv6(boolean show) Sets whether to show content to users accessing the page via IPv6.- Parameters:
show
- TRUE if content should be displayed, otherwise FALSE
-
release
public void release()Releases the tag's state variables.- Specified by:
release
in interfaceTag
- Overrides:
release
in classTagSupport
-
doStartTag
public int doStartTag()Determines whether to include content based on the IP address.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Returns:
- EVAL_BODY_INCLUDE or SKIP_BODY
-
doEndTag
public int doEndTag()Closes the tag. Included only to reset state.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
-