Class Include
- java.lang.Object
-
- jakarta.servlet.jsp.tagext.SimpleTagSupport
-
- org.glassfish.jersey.server.mvc.jsp.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 theresolvingClass
class. This tag looks for a side JSP file of the given name from the inheritance hierarchy of the "resolvingClass" class, and includes the contents of it, just like <jsp:include>. For example, if theresolvingClass
class is theFoo
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 namedabc.jsp
(/WEB-INF/Foo/abc.jsp
) - a side-file of the
Bar
class namedabc.jsp
(/WEB-INF/Bar/abc.jsp
) - a side-file of the
Zot
class namedabc.jsp
(/WEB-INF/Zot/abc.jsp
)
- Author:
- Kohsuke Kawaguchi, Paul Sandoz
-
-
Constructor Summary
Constructors Constructor Description Include()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doTag()
void
setPage(String page)
Specifies the name of the JSP to be included.
-
-
-
Method Detail
-
setPage
public void setPage(String page)
Specifies the name of the JSP to be included.- Parameters:
page
- page to be included.
-
doTag
public void doTag() throws jakarta.servlet.jsp.JspException, IOException
- Specified by:
doTag
in interfacejakarta.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in classjakarta.servlet.jsp.tagext.SimpleTagSupport
- Throws:
jakarta.servlet.jsp.JspException
IOException
-
-