Class RequestURLTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class RequestURLTag
    extends javax.servlet.jsp.tagext.TagSupport
    RequestURLTag writes the current request URL to the current JspWriter. The body of this tag allows multiple addParam and removeParam tags to modify the current request URL before it is written.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      RequestURLTag()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addParam​(java.lang.String name, java.lang.String value)
      Adds a parameter with the given name and value.
      int doEndTag()
      int doStartTag()
      void release()
      void removeParam​(java.lang.String name)
      Removes the parameter and all its values with the given name.
      void removeParam​(java.lang.String name, java.lang.String value)
      Removes a value from the parameter with the given name.
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestURLTag

        public RequestURLTag()
        Default constructor.
    • Method Detail

      • removeParam

        public void removeParam​(java.lang.String name)
        Removes the parameter and all its values with the given name.
        Parameters:
        name - the name of the parameter.
      • removeParam

        public void removeParam​(java.lang.String name,
                                java.lang.String value)
        Removes a value from the parameter with the given name.
        Parameters:
        name - name of the parameter.
        value - the value to remove.
      • addParam

        public void addParam​(java.lang.String name,
                             java.lang.String value)
        Adds a parameter with the given name and value.
        Parameters:
        name - the name of the parameter.
        value - the value for the parameter.
      • release

        public void release()
        Specified by:
        release in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        release in class javax.servlet.jsp.tagext.TagSupport
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.TagSupport
        Throws:
        javax.servlet.jsp.JspException
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.TagSupport
        Throws:
        javax.servlet.jsp.JspException