com.sun.jersey.server.impl.container.servlet
Class Include

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by com.sun.jersey.server.impl.container.servlet.Include
All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag

public class Include
extends javax.servlet.jsp.tagext.SimpleTagSupport

Includes a side JSP file for the "resolvingClass" 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 the "resolvingClass" class is 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.
  1. a side-file of the Foo class named abc.jsp (/WEB-INF/Foo/abc.jsp)
  2. a side-file of the Bar class named abc.jsp (/WEB-INF/Bar/abc.jsp)
  3. a side-file of the Zot class named abc.jsp (/WEB-INF/Zot/abc.jsp)

Author:
Kohsuke Kawaguchi, Paul.Sandoz@Sun.Com

Constructor Summary
Include()
           
 
Method Summary
 void doTag()
           
 void setPage(String page)
          Specifies the name of the JSP to be included.
 void setResolvingClass(Class<?> resolvingClass)
          Specifies the resolving class for which JSP will be included.
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Include

public Include()
Method Detail

setPage

public void setPage(String page)
Specifies the name of the JSP to be included.


setResolvingClass

public void setResolvingClass(Class<?> resolvingClass)
Specifies the resolving class for which JSP will be included.


doTag

public void doTag()
           throws javax.servlet.jsp.JspException,
                  IOException
Specified by:
doTag in interface javax.servlet.jsp.tagext.SimpleTag
Overrides:
doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
Throws:
javax.servlet.jsp.JspException
IOException


Copyright © 2013 Oracle Corporation. All Rights Reserved.