Class GetResourceTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.sling.scripting.jsp.taglib.GetResourceTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class GetResourceTag extends TagSupport
Tag for retrieving resources based on either an absolute path or a relative path and a base resource.
See Also:
  • Constructor Details

    • GetResourceTag

      public GetResourceTag()
  • Method Details

    • doEndTag

      public int doEndTag()
      Description copied from class: TagSupport
      Default processing of the end tag returning EVAL_PAGE.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Returns:
      EVAL_PAGE
      See Also:
    • getBase

      public Resource getBase()
      Gets the base resource.
      Returns:
      the base resource
    • getPath

      public String getPath()
      Get the path of the resource to retrieve.
      Returns:
      the path
    • getVar

      public String getVar()
      Gets the variable name to which to save the list of children.
      Returns:
      the variable name
    • setBase

      public void setBase(Resource base)
      Sets the base resource.
      Parameters:
      base - the new base resource
    • setPath

      public void setPath(String path)
      Set the path of the resource to retrieve.
      Parameters:
      path - the path
    • setVar

      public void setVar(String var)
      Sets the variable name to which to save the list of children.
      Parameters:
      var - the variable name