org.apache.struts.taglib.html

Class HtmlTag


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:
$Revision: 1.11 $ $Date: 2003/03/08 19:23:49 $

Authors:
Craig R. McClanahan
David Graham

Field Summary

protected boolean
locale
Should we set the current Locale for this user if needed?
protected static MessageResources
messages
The message resources for this package.
protected boolean
xhtml
Are we rendering an xhtml page?

Method Summary

protected Locale
currentLocale()
Deprecated. Use getCurrentLocale instead because it makes the display logic easier.
int
doEndTag()
Process the end of this tag.
int
doStartTag()
Process the start of this tag.
protected Locale
getCurrentLocale()
Return the current Locale for this request.
boolean
getLocale()
boolean
getXhtml()
void
release()
Release any acquired resources.
void
setLocale(boolean locale)
void
setXhtml(boolean xhtml)

Field Details

locale

protected boolean locale
Should we set the current Locale for this user if needed?


messages

protected static MessageResources messages
The message resources for this package.


xhtml

protected boolean xhtml
Are we rendering an xhtml page?

Method Details

currentLocale

protected Locale currentLocale()

Deprecated. Use getCurrentLocale instead because it makes the display logic easier.

Return the current Locale for this request, creating a new one if necessary. If there is no current Locale, and locale support is not requested, return null.


doEndTag

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


doStartTag

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


getCurrentLocale

protected Locale getCurrentLocale()
Return the current Locale for this request. If there is no locale in the session and the locale attribute is set to "true", this method will create a Locale based on the client's Accept-Language header or the server's default locale and store it in the session. This will always return a Locale and never null.

Since:
Struts 1.1


getLocale

public boolean getLocale()


getXhtml

public boolean getXhtml()


release

public void release()
Release any acquired resources.


setLocale

public void setLocale(boolean locale)


setXhtml

public void setXhtml(boolean xhtml)


Copyright B) 2000-2005 - Apache Software Foundation