com.ora.jsp.tags.generic
Class ValidateSessionTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--com.ora.jsp.tags.generic.ValidateSessionTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class ValidateSessionTag
- extends javax.servlet.jsp.tagext.TagSupport
This class is a custom action for checking if a session
contains information about an authenticated user.
- Version:
- 1.0
- Author:
- Hans Bergsten, Gefion software
- See Also:
- Serialized Form
Field Summary |
private java.lang.String |
errorMsg
|
private java.lang.String |
loginPage
|
private java.lang.String |
name
|
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext, parent, values |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
int |
doEndTag()
Looks for the specified session bean. |
void |
release()
Releases all instance variables. |
void |
setErrorMsg(java.lang.String errorMsg)
Sets the error message to display on the login page. |
void |
setLoginPage(java.lang.String loginPage)
Sets the login page URL |
void |
setName(java.lang.String name)
Sets the name of the session object to look for. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
name
private java.lang.String name
errorMsg
private java.lang.String errorMsg
loginPage
private java.lang.String loginPage
ValidateSessionTag
public ValidateSessionTag()
setName
public void setName(java.lang.String name)
- Sets the name of the session object to look for.
- Parameters:
name
- the name of the session object to look for
setErrorMsg
public void setErrorMsg(java.lang.String errorMsg)
- Sets the error message to display on the login page.
- Parameters:
errorMsg
- the error message to display on the login page
setLoginPage
public void setLoginPage(java.lang.String loginPage)
- Sets the login page URL
- Parameters:
loginPage
- the login page URL
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Looks for the specified session bean. If not found, forwards the
request to the specifed error page with the parameters origURL and
errorMsg.
- Overrides:
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
release
public void release()
- Releases all instance variables.
- Overrides:
release
in class javax.servlet.jsp.tagext.TagSupport