|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.jcorporate.expresso.ext.taglib.RestrictAccessTag
Restrict Access Tag - To easily restrict JSP page access.
This class provides an easy way to restrict access to particular pages. Attributes: allowedUsers: A comma delimited list of user names that are allowed to access this page.
allowedGroups: A comma delimited list of groups that are allowed access to this page
If neither allowedUsers or allowedGroups is set, then anybody that's logged in, will be allowed to access the page.
Example Usage (Allows admin group to this page):
<%@ taglib uri="expresso.tld" prefix"expresso" %>
<expresso:RestrictAccess allowedGroups="admin" />
| 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 | |
RestrictAccessTag()
|
|
| Method Summary | |
protected void |
denyAccess()
|
int |
doEndTag()
Standard doEndTag. |
int |
doStartTag()
Do nothing until end tag. |
void |
setAllowedGroups(String groupList)
Adds a comma delimited list of allowed groups to the allowedGroups Hashtable |
void |
setAllowedUsers(String userList)
Adds a comma delimited list of allowed users to the allowedUsers Hashtable. |
void |
setDenyURL(String url)
Sets a URL to forward to if access is denied |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RestrictAccessTag()
| Method Detail |
public void setAllowedUsers(String userList)
userList - the allowed users for this userpublic void setAllowedGroups(String groupList)
groupList - a comma delimited list of groups allowed to access this
pagepublic void setDenyURL(String url)
url - the URL to forward to if access to this page is denied
public int doEndTag()
throws JspTagException
JspTagException
public int doStartTag()
throws JspTagException
JspTagException - The exception description.
protected void denyAccess()
throws JspTagException
JspTagException
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||