org.apache.struts.taglib
Class HtmlPropertyTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--org.apache.struts.taglib.HtmlPropertyTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public final class HtmlPropertyTag
extends javax.servlet.jsp.tagext.TagSupport

Custom tag implementation that acts like <jsp:getProperty> but encodes the output stream so that HTML-related characters do not cause difficulties.

Version:
$Revision: 1.5 $ $Date: 2001/05/20 01:19:02 $
Author:
Craig R. McClanahan
See Also:
Serialized Form

Field Summary
private static MessageResources messages
          The message resources for this package.
private  java.lang.String name
          The name of the object instance from which the property is obtained.
private  java.lang.String property
          The name of the property to get.
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext, parent, values
 
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
HtmlPropertyTag()
          Construct a new instance of this tag.
 
Method Summary
 int doStartTag()
          Process the start tag.
 java.lang.String getName()
          Return the object name.
 java.lang.String getProperty()
          Return the property name.
 void release()
          Release any acquired resources.
 void setName(java.lang.String name)
          Set the object name.
 void setProperty(java.lang.String property)
          Set the property name.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, 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
 

Field Detail

name

private java.lang.String name
The name of the object instance from which the property is obtained.

messages

private static MessageResources messages
The message resources for this package.

property

private java.lang.String property
The name of the property to get.
Constructor Detail

HtmlPropertyTag

public HtmlPropertyTag()
Construct a new instance of this tag.
Method Detail

getName

public java.lang.String getName()
Return the object name.

setName

public void setName(java.lang.String name)
Set the object name.
Parameters:
name - The new object name

getProperty

public java.lang.String getProperty()
Return the property name.

setProperty

public void setProperty(java.lang.String property)
Set the property name.
Parameters:
property - The new property name

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Process the start tag.
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport


Copyright © 2000-2002 - Apache Software Foundation