Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.webapp.example2
Class CheckLogonTag

    java.lang.Object
      javax.servlet.jsp.tagext.TagSupport
          org.apache.struts.webapp.example2.CheckLogonTag

All Implemented Interfaces:
  Serializable, IterationTag, Tag

    public final class CheckLogonTag

extends TagSupport

Check for a valid User logged on in the current session. If there is no such user, forward control to the logon page.

Version:
  $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $
Author:
  Craig R. McClanahan, Marius Barduta
See Also:
  Serialized Form

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
`CheckLogonTag()`

Method Summary
`int` | `doEndTag()` Perform our logged-in user check by looking for the existence of a session scope bean under the specified name.
`int` | `doStartTag()` Defer our checking until the end of this tag is encountered.
`String` | `getName()` Return the bean name.
`String` | `getPage()` Return the forward page.
`void` | `release()` Release any acquired resources.
`void` | `setName(String name)` Set the bean name.
`void` | `setPage(String page)` Set the forward page.

Methods inherited from class javax.servlet.jsp.tagext.TagSupport
`doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, 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

### CheckLogonTag

    public CheckLogonTag()

Method Detail

### getName

    public String getName()

  Return the bean name.

### setName

    public void setName(String name)

  Set the bean name.

  Parameters:
    `name` - The new bean name

### getPage

    public String getPage()

  Return the forward page.

### setPage

    public void setPage(String page)

  Set the forward page.

  Parameters:
    `page` - The new forward page

### doStartTag

    public int doStartTag()
                   throws JspException

  Defer our checking until the end of this tag is encountered.

  Specified by:
    `doStartTag` in interface `Tag`
  Overrides:
    `doStartTag` in class `TagSupport`
  Throws:
    `JspException` - if a JSP exception has occurred

### doEndTag

    public int doEndTag()
                 throws JspException

  Perform our logged-in user check by looking for the existence of a session scope bean under the specified name. If this bean is not present, control is forwarded to the specified logon page.

  Specified by:
    `doEndTag` in interface `Tag`
  Overrides:
    `doEndTag` in class `TagSupport`
  Throws:
    `JspException` - if a JSP exception has occurred

### release

    public void release()

  Release any acquired resources.

  Specified by:
    `release` in interface `Tag`
  Overrides:
    `release` in class `TagSupport`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.