org.apache.struts.taglib.html
Class HtmlTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.struts.taglib.html.HtmlTag
All Implemented Interfaces:
Serializable, IterationTag, Tag

public class HtmlTag
extends TagSupport

Renders an HTML element with appropriate language attributes if there is a current Locale available in the user's session.

Version:
$Rev: 482895 $ $Date: 2005-08-21 19:08:45 -0400 (Sun, 21 Aug 2005) $
See Also:
Serialized Form

Field Summary
protected  boolean lang
          Are we rendering a lang attribute?
protected static org.apache.struts.util.MessageResources messages
          The message resources for this package.
protected  boolean xhtml
          Are we rendering an xhtml page?
 
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
HtmlTag()
           
 
Method Summary
 int doEndTag()
          Process the end of this tag.
 int doStartTag()
          Process the start of this tag.
 boolean getLang()
          Returns true if the tag should render a lang attribute.
 boolean getXhtml()
           
 void release()
          Release any acquired resources.
protected  String renderHtmlStartElement()
          Renders an <html> element with appropriate language attributes.
 void setLang(boolean lang)
          Sets whether the tag should render a lang attribute.
 void setXhtml(boolean xhtml)
           
 
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
 

Field Detail

messages

protected static org.apache.struts.util.MessageResources messages
The message resources for this package.


xhtml

protected boolean xhtml
Are we rendering an xhtml page?


lang

protected boolean lang
Are we rendering a lang attribute?

Since:
Struts 1.2
Constructor Detail

HtmlTag

public HtmlTag()
Method Detail

getXhtml

public boolean getXhtml()

setXhtml

public void setXhtml(boolean xhtml)

getLang

public boolean getLang()
Returns true if the tag should render a lang attribute.

Since:
Struts 1.2

setLang

public void setLang(boolean lang)
Sets whether the tag should render a lang attribute.

Since:
Struts 1.2

doStartTag

public int doStartTag()
               throws JspException
Process the start of this tag.

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

renderHtmlStartElement

protected String renderHtmlStartElement()
Renders an <html> element with appropriate language attributes.

Since:
Struts 1.2

doEndTag

public int doEndTag()
             throws JspException
Process the end of this tag.

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


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