JavaScript is disabled on your browser.
javax.servlet.jsp

Class JspContext

  • Direct Known Subclasses:
    PageContext


    public abstract class JspContext
    extends java.lang.Object
    Base class for the PageContext.
    Since:
    2.0
    • Constructor Summary

      Constructors
      Constructor and Description
      JspContext ()
    • Method Summary

      Methods
      Modifier and Type Method and Description
      abstract java.lang.Object findAttribute (java.lang.String name)
      Returns the specified attribute value from any scope, or null if not found.
      abstract java.lang.Object getAttribute (java.lang.String name)
      Returns the specified attribute value in page scope.
      abstract java.lang.Object getAttribute (java.lang.String name, int scope)
      Returns the specified attribute value in the specified scope.
      abstract java.util.Enumeration getAttributeNamesInScope (int scope)
      Returns all the attribute names in the given scope.
      abstract int getAttributesScope (java.lang.String name)
      Returns the scope of the given attribute.
      abstract ELContext getELContext ()
      Returns the EL context associated with this context.
      abstract ExpressionEvaluator getExpressionEvaluator ()
      abstract JspWriter getOut ()
      Returns the out page object.
      abstract VariableResolver getVariableResolver ()
      Deprecated.
      abstract JspWriter popBody ()
      Returns the previous JspWriter saved by the last matching call to pushBody(java.io.Writer).
      abstract JspWriter pushBody (java.io.Writer writer)
      Returns a new JspWriter that wraps the specified writer.
      abstract void removeAttribute (java.lang.String name)
      Removes the specified attribute from all scopes.
      abstract void removeAttribute (java.lang.String name, int scope)
      Removes the specified attribute from the specified scope.
      abstract void setAttribute (java.lang.String name, java.lang.Object value)
      Set the specified attribute in page scope.
      abstract void setAttribute (java.lang.String name, java.lang.Object attribute, int scope)
      Set the specified attribute with the specified scope.
      • Methods inherited from class java.lang.Object

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

      • JspContext

        public JspContext()
    • Method Detail

      • setAttribute

        public abstract void setAttribute(java.lang.String name,
         java.lang.Object value)
        Set the specified attribute in page scope.
        Parameters:
        name - the attribute name
        attribute - value of the attribute
        Throws:
        java.lang.NullPointerException - if name is null
      • setAttribute

        public abstract void setAttribute(java.lang.String name,
         java.lang.Object attribute,
         int scope)
        Set the specified attribute with the specified scope.
        Parameters:
        name - the attribute name
        attribute - value of the attribute
        scope - scope of the attribute
        Throws:
        java.lang.NullPointerException - if name is null
        java.lang.IllegalArgumentException - if scope is not a valid scope
        See Also:
        PageContext.APPLICATION_SCOPE, PageContext.PAGE_SCOPE, PageContext.REQUEST_SCOPE, PageContext.SESSION_SCOPE
      • getAttribute

        public abstract java.lang.Object getAttribute(java.lang.String name)
        Returns the specified attribute value in page scope.
        Parameters:
        name - the attribute name
        Returns:
        the object associated with this name
        Throws:
        java.lang.NullPointerException - if name is null
      • getAttribute

        public abstract java.lang.Object getAttribute(java.lang.String name,
         int scope)
        Returns the specified attribute value in the specified scope.
        Parameters:
        name - the attribute name
        scope - scope of the attribute
        Returns:
        the object associated with this name.
        Throws:
        java.lang.NullPointerException - if name is null
        java.lang.IllegalArgumentException - if scope is not a valid scope
        See Also:
        PageContext.APPLICATION_SCOPE, PageContext.PAGE_SCOPE, PageContext.REQUEST_SCOPE, PageContext.SESSION_SCOPE
      • findAttribute

        public abstract java.lang.Object findAttribute(java.lang.String name)
        Returns the specified attribute value from any scope, or null if not found. Scopes are searched in the following order: page, request, session, application.
        Parameters:
        name - the attribute name
        Throws:
        java.lang.NullPointerException - if name is null
      • removeAttribute

        public abstract void removeAttribute(java.lang.String name)
        Removes the specified attribute from all scopes.
        Parameters:
        name - the attribute name
        Throws:
        java.lang.NullPointerException - if name is null
      • getAttributesScope

        public abstract int getAttributesScope(java.lang.String name)
        Returns the scope of the given attribute.
        Parameters:
        name - the attribute name
        Returns:
        the scope where the attribute is defined, or 0 if not found
        Throws:
        java.lang.NullPointerException - if name is null
      • getAttributeNamesInScope

        public abstract java.util.Enumeration getAttributeNamesInScope(int scope)
        Returns all the attribute names in the given scope.
        Parameters:
        scope - the scope
        Throws:
        java.lang.IllegalArgumentException - if scope is not a valid scope
      • getOut

        public abstract JspWriter getOut()
        Returns the out page object.
      • getELContext

        public abstract ELContext getELContext()
        Returns the EL context associated with this context.
        Since:
        2.1
      • pushBody

        public abstract JspWriter pushBody(java.io.Writer writer)
        Returns a new JspWriter that wraps the specified writer. This updates the value of the out page object.
        Since:
        2.0
      • popBody

        public abstract JspWriter popBody()
        Returns the previous JspWriter saved by the last matching call to pushBody(java.io.Writer). This updates the value of the out page object.

AltStyle によって変換されたページ (->オリジナル) /