FileDocCategorySizeDatePackage
SetTimeZoneSupport.javaAPI DocGlassfish v2 API4239Sat May 05 19:17:54 BST 2007org.apache.taglibs.standard.tag.common.fmt

SetTimeZoneSupport

public abstract class SetTimeZoneSupport extends javax.servlet.jsp.tagext.TagSupport
Support for tag handlers for <setTimeZone>, the time zone setting tag in JSTL 1.0.
author
Jan Luehe

Fields Summary
protected Object
value
private int
scope
private String
var
Constructors Summary
public SetTimeZoneSupport()

	super();
	init();
    
Methods Summary
public intdoEndTag()

	TimeZone timeZone = null;

	if (value == null) {
	    timeZone = TimeZone.getTimeZone("GMT");
	} else if (value instanceof String) {
	    if (((String) value).trim().equals("")) {
		timeZone = TimeZone.getTimeZone("GMT");
	    } else {
		timeZone = TimeZone.getTimeZone((String) value);
	    }
	} else {
	    timeZone = (TimeZone) value;
	}

	if (var != null) {
	    pageContext.setAttribute(var, timeZone, scope);
	} else {
	    Config.set(pageContext, Config.FMT_TIME_ZONE, timeZone, scope);
	}

	return EVAL_PAGE;
    
private voidinit()

	value = var = null;
	scope = PageContext.PAGE_SCOPE;
    
public voidrelease()

	init();
    
public voidsetScope(java.lang.String scope)

	this.scope = Util.getScope(scope);
    
public voidsetVar(java.lang.String var)

        this.var = var;