org.appfuse.webapp.taglib
Class Secure

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.appfuse.webapp.taglib.Secure
All Implemented Interfaces:
BodyTag, IterationTag, JspTag, Serializable, Tag

public class Secure
extends BodyTagSupport

This tag library is designed to be used on a JSP to switch HTTP -> HTTPS protocols and vise versa. If you want to force the page to be viewed in SSL, then you would do something like this:

 <tag:secure />
 or
 <tag:secure mode="secured" />
 
If you want the force the page to be viewed in over standard http, then you would do something like:
 <tag:secure mode="unsecured" />
 

Author:
Jon Lipsky Contributed by: XEsoft GmbH Oskar-Messter-Strasse 18 85737 Ismaning, Germany http://www.xesoft.com
See Also:
Serialized Form
JSP Tag:
name="secure" bodycontent="empty"

Field Summary
static String MODE_EITHER
           
static String MODE_SECURED
           
static String MODE_UNSECURED
           
protected  String TAG_NAME
           
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
Secure()
           
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
           
 int doStartTag()
           
 void setMode(String aMode)
          Sets the mode attribute.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
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
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

MODE_SECURED

public static String MODE_SECURED

MODE_UNSECURED

public static String MODE_UNSECURED

MODE_EITHER

public static String MODE_EITHER

TAG_NAME

protected String TAG_NAME
Constructor Detail

Secure

public Secure()
Method Detail

setMode

public void setMode(String aMode)
Sets the mode attribute. This is included in the tld file.

JSP Attribute:
description="The mode attribute (secure | unsecured)" required="false" rtexprvalue="true"

doStartTag

public int doStartTag()
               throws JspException
Throws:
JspException

doAfterBody

public int doAfterBody()
                throws JspException
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException
Throws:
JspException


Copyright © 2002-2004