com.arsdigita.acs.tags
Class UseTemplateTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--com.arsdigita.acs.tags.UseTemplateTag
- All Implemented Interfaces:
- Serializable, Tag
- public class UseTemplateTag
- extends TagSupport
- implements Tag
Tag to pass control from a business-logic JSP (which does database
queries, access filtering, etc.) to a presentation-logic template JSP.
The following requirements must be met for the template tag to work:
- All template JSPs must end with a .tpl extension, which must
be mapped to the JSP handler servlet; this is so that we can bypass
the request processor servlet for templates, but not for regular
JSPs.
- The presentation-layer JSP files must reside in the /templates
directory, relative to the context root; this directory parallels
the normal-JSP hierarchy, so that use_template in /path/to/page.jsp
will forward to the template /templates/path/to/page.tpl.
- If you get an error message from a template that "response has
already been committed," try taking out the ad:header tags in the
template.
- See Also:
- Serialized Form
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UseTemplateTag
public UseTemplateTag()
doStartTag
public int doStartTag()
throws JspException
- Description copied from interface:
Tag
- Process the start tag for this instance.
- Specified by:
doStartTag
in interface Tag
- Overrides:
doStartTag
in class TagSupport
- Following copied from interface:
javax.servlet.jsp.tagext.Tag
- See Also:
BodyTag
doEndTag
public int doEndTag()
throws JspException
- Description copied from interface:
Tag
- Process the end tag. This method will be called on all Tag objects.
- Specified by:
doEndTag
in interface Tag
- Overrides:
doEndTag
in class TagSupport
setMethod
public void setMethod(String meth)
throws JspTagException