org.mmbase.bridge.jsp.taglib
Class WriteTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.mmbase.bridge.jsp.taglib.ContextReferrerTag
              extended by org.mmbase.bridge.jsp.taglib.WriteTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally, ContainerReferrer, FunctionContainerReferrer, Writer

public class WriteTag
extends ContextReferrerTag
implements Writer, FunctionContainerReferrer

The writetag can take a variable from the context and put it in a jsp variable, or write it to the page. This is also more or less the simplest possible implemententation of a Writer tag.

Version:
$Id: WriteTag.java 39649 2009-11-11 16:38:02Z michiel $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
static int DEFAULT_MAX_COOKIE_AGE
           
static String MAX_COOKIE_AGE_KEY
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
WriteTag()
           
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
           
 int doStartTag()
           
protected  int getMaxCookieAge()
           
protected  Object getObject()
           
 void setApplication(String s)
           
 void setContainer(String c)
          If it should not use parent container
 void setCookie(String s)
           
 void setRequest(String s)
           
 void setReset(boolean reset)
          Like reset of mm:import.
 void setSession(String s)
           
 void setValue(String v)
           
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
appendMoreParameters, doCatch, doFinally, fillStandardParameters, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocale, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setListdelimiter, setPageContext, setPageContextOnly, setReferid, setVartype, setWrite, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mmbase.bridge.jsp.taglib.Writer
getWriterValue, haveBody, setEscape, setJspvar, setVartype, setWrite
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

DEFAULT_MAX_COOKIE_AGE

public static final int DEFAULT_MAX_COOKIE_AGE
See Also:
Constant Field Values

MAX_COOKIE_AGE_KEY

public static final String MAX_COOKIE_AGE_KEY
See Also:
Constant Field Values
Constructor Detail

WriteTag

public WriteTag()
Method Detail

setSession

public void setSession(String s)
                throws JspTagException
Throws:
JspTagException

setCookie

public void setCookie(String s)
               throws JspTagException
Throws:
JspTagException

setApplication

public void setApplication(String s)
                    throws JspTagException
Throws:
JspTagException
Since:
MMBase-1.7.4

setRequest

public void setRequest(String s)
                throws JspTagException
Throws:
JspTagException
Since:
MMBase-1.7.4

setReset

public void setReset(boolean reset)
Like reset of mm:import. Mainly implemented for testing.

Since:
MMBase-1.9.2

setValue

public void setValue(String v)
              throws JspTagException
Throws:
JspTagException

setContainer

public void setContainer(String c)
                  throws JspTagException
Description copied from interface: FunctionContainerReferrer
If it should not use parent container

Specified by:
setContainer in interface ContainerReferrer
Specified by:
setContainer in interface FunctionContainerReferrer
Throws:
JspTagException

getObject

protected Object getObject()
                    throws JspTagException
Throws:
JspTagException

getMaxCookieAge

protected int getMaxCookieAge()

doStartTag

public int doStartTag()
               throws JspTagException
Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspTagException

doAfterBody

public int doAfterBody()
                throws JspException
Specified by:
doAfterBody in interface IterationTag
Overrides:
doAfterBody in class BodyTagSupport
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspTagException
Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
JspTagException


MMBase 2.0-SNAPSHOT - null