FileDocCategorySizeDatePackage
SetHeaderTag.javaAPI DocExample1411Tue Feb 28 11:34:06 GMT 2006com.ora.jsp.tags

SetHeaderTag

public class SetHeaderTag extends SimpleTagSupport
This class is a custom action for setting response header values.
author
Hans Bergsten, Gefion software
version
2.0

Fields Summary
private String
name
private String
value
Constructors Summary
Methods Summary
public voiddoTag()
Sets the header specified by the name property to the value specified by the value property.

        if (value.length() == 0 || name.length() == 0) {
            throw new JspTagException("setHeader: " +
                 "one of the attributes is not set");
        }
        PageContext pageContext = (PageContext) getJspContext();
        HttpServletResponse response = 
            (HttpServletResponse) pageContext.getResponse();
        response.setHeader(name, value);
    
public voidsetName(java.lang.String name)
Sets the name attribute.

param
name the parameter name

        this.name = name;
    
public voidsetValue(java.lang.String value)
Sets the value attribute from a String.

param
value the parameter String value

        this.value = value;