|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
com.sun.appserv.web.taglibs.cache.CacheTag
public class CacheTag
CacheTag is a JSP tag that allows server-side caching of JSP page
fragments. It lets you specify a timeout for how long the cached data
is valid. It also gives you programmatic control over key generation,
refreshing of the cache and whether the cached content should be served
or not.
Usage Example:
<%@ taglib prefix="ias" uri="Sun ONE Application Server Tags" %>
| Field Summary |
|---|
| Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
bodyContent |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
id, 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 | |
|---|---|
CacheTag()
|
|
| Method Summary | |
|---|---|
int |
doAfterBody()
doAfterBody is called only if the body was evaluated. |
int |
doEndTag()
doEndTag just resets all the valiables in case the tag is reused |
int |
doStartTag()
doStartTag is called every time the cache tag is encountered. |
void |
setKey(java.lang.String key)
This is used to set a user-defined key to store the response in the cache. |
void |
setNocache(boolean noCache)
This attribute is used to programmatically enable or disable the use of the cached response. |
void |
setRefresh(boolean refresh)
This attribute is used to programmatically refresh the cached response. |
void |
setScope(java.lang.String scope)
Sets the scope of the cache. |
void |
setTimeout(java.lang.String timeout)
This sets the time for which the cached response is valid. |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
getParent, setPageContext, setParent |
| Constructor Detail |
|---|
public CacheTag()
| Method Detail |
|---|
public int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException - the standard exception thrown
public int doAfterBody()
throws javax.servlet.jsp.JspException
doAfterBody in interface javax.servlet.jsp.tagext.IterationTagdoAfterBody in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException - the standard exception thrown
public int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException - the standard exception thrownpublic void setKey(java.lang.String key)
public void setTimeout(java.lang.String timeout)
public void setNocache(boolean noCache)
public void setRefresh(boolean refresh)
public void setScope(java.lang.String scope)
scope - the scope of the cache
java.lang.IllegalArgumentException - if the specified scope is different
from request, session, and application
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||