Package org.kohsuke.stapler.tags
Class Include
java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
org.kohsuke.stapler.tags.Include
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.SimpleTag
public class Include
extends jakarta.servlet.jsp.tagext.SimpleTagSupport
Includes a side JSP file for the "it" object.
This tag looks for a side JSP file of the given name
from the inheritance hierarchy of the it object,
and includes the contents of it, just like <jsp:include>.
For example, if the "it" object is an instance of the Foo class,
which looks like the following:
class Foo extends Bar { ... }
class Bar extends Zot { ... }
And if you write:
<st:include page="abc.jsp"/>
then, it looks for the following files in this order,
and includes the first one found.
- a side-file of the Foo class named abc.jsp (/WEB-INF/side-files/Foo/abc.jsp)
- a side-file of the Bar class named abc.jsp (/WEB-INF/side-files/Bar/abc.jsp)
- a side-file of the Zot class named abc.jsp (/WEB-INF/side-files/Zot/abc.jsp)
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class jakarta.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
-
Constructor Details
-
Include
public Include()
-
-
Method Details
-
setPage
Specifies the name of the JSP to be included. -
setIt
Specifies the object for which JSP will be included. -
doTag
- Specified by:
doTagin interfacejakarta.servlet.jsp.tagext.SimpleTag- Overrides:
doTagin classjakarta.servlet.jsp.tagext.SimpleTagSupport- Throws:
jakarta.servlet.jsp.JspExceptionIOException
-