org.mmbase.bridge.jsp.taglib
Class ContentTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.mmbase.bridge.jsp.taglib.ContextReferrerTag
org.mmbase.bridge.jsp.taglib.CloudReferrerTag
org.mmbase.bridge.jsp.taglib.LocaleTag
org.mmbase.bridge.jsp.taglib.ContentTag
- All Implemented Interfaces:
- BodyTag, IterationTag, Serializable, Tag
- public class ContentTag
- extends LocaleTag
Provided environmental information to its body's tags.
- Since:
- MMBase-1.7
- Version:
- $Id: ContentTag.java,v 1.55 2006/07/15 11:50:47 michiel Exp $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag |
findLoopOrQuery, findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getDefaultLocale, getEscapedValue, getId, getObject, getObjectConditional, getPageContext, getPageContextTag, getReferid, getString, getTaglibVersion, getTimeZone, getWriterValue, haveBody, setContext, setEscape, setId, setListdelimiter, setPageContext, setReferid, setVartype, setWrite, setWriter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ESCAPER_KEY
public static final String ESCAPER_KEY
- See Also:
- Constant Field Values
ContentTag
public ContentTag()
readXML
protected static void readXML(InputSource escapersSource)
setType
public void setType(String ct)
throws JspTagException
- Throws:
JspTagException
setEncoding
public void setEncoding(String e)
throws JspTagException
- Throws:
JspTagException
setEscaper
public void setEscaper(String e)
throws JspTagException
- Throws:
JspTagException
setPostprocessor
public void setPostprocessor(String e)
throws JspTagException
- Throws:
JspTagException
setExpires
public void setExpires(String e)
throws JspTagException
- Throws:
JspTagException
getType
public String getType()
throws JspTagException
- Throws:
JspTagException
setStatus
public void setStatus(String s)
throws JspTagException
- Throws:
JspTagException
setRefresh
public void setRefresh(String r)
throws JspTagException
- Throws:
JspTagException
getPostProcessor
protected CharTransformer getPostProcessor()
throws JspTagException
- Returns:
- A CharTransformer or null if no postprocessing needed
- Throws:
JspTagException - can occur if taglibcontent.xml is misconfigured
getEncoding
public String getEncoding()
throws JspTagException
- Throws:
JspTagException
getSimpleCharTransformer
protected static CharTransformer getSimpleCharTransformer(String id,
ContextReferrerTag tag)
throws JspTagException
- Gets a CharTransformer identified by
id, withouth trying to create chains of
them.
- Throws:
JspTagException
getCharTransformer
public static CharTransformer getCharTransformer(String id,
ContextReferrerTag tag)
throws JspTagException
- Gets a CharTransformer identified by
id, which possibly can also be list of id's
in which case a chain of chartransformers will be returned.
- Returns:
- A CharTransformer
- Throws:
JspTagException - if not transformer with given id was configured
getTransformerFactory
public static ParameterizedTransformerFactory getTransformerFactory(String id)
throws JspTagException
- Returns transformer factory with given id or throws exception if there is none
- Throws:
JspTagException
getWriteEscaper
public CharTransformer getWriteEscaper()
- Called by children
- Returns:
- A CharTransformer (not null)
setWriteEscaper
protected void setWriteEscaper()
throws JspTagException
- Throws:
JspTagException
unsetWriteEscaper
protected void unsetWriteEscaper()
determineLocale
protected void determineLocale()
throws JspTagException
- Overrides:
determineLocale in class LocaleTag
- Throws:
JspTagException- See Also:
LocaleTag.determineLocale()
doStartTag
public int doStartTag()
throws JspTagException
- Specified by:
doStartTag in interface Tag- Overrides:
doStartTag in class LocaleTag
- Throws:
JspTagException
addNoCacheHeaders
protected void addNoCacheHeaders(HttpServletRequest request,
HttpServletResponse response,
long expire)
- The code first sets the Expires header to a date in the
past. This indicates to the recipient that the page's content
have already expired, as a hint that it's contents should not be
cached. The no-cache value for the Pragma header is provided by
version 1.0 of the HTTP protocol to further indicate that
browsers and proxy servers should not cache a page. Version 1.1
of HTTP replaces this header with a more specific Cache-Control
header, but recommends including the Pragma header as well for
backward compatibility.
- Parameters:
response - - http responseexpire - - seconds before content should expire
doEndTag
public int doEndTag()
throws JspTagException
- Specified by:
doEndTag in interface Tag- Overrides:
doEndTag in class LocaleTag
- Throws:
JspTagException
doAfterBody
public int doAfterBody()
throws JspTagException
- Specified by:
doAfterBody in interface IterationTag- Overrides:
doAfterBody in class LocaleTag
- Throws:
JspTagException
MMBase build 1.8.1.20060716