org.springframework.web

Class HttpSessionRequiredException

  • All Implemented Interfaces:
    java.io.Serializable


    public class HttpSessionRequiredException
    extends ServletException
    Exception thrown when an HTTP request handler requires a pre-existing session.
    Since:
    2.0
    Author:
    Juergen Hoeller
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      HttpSessionRequiredException(java.lang.String msg)
      Create a new HttpSessionRequiredException.
      HttpSessionRequiredException(java.lang.String msg, java.lang.String expectedAttribute)
      Create a new HttpSessionRequiredException.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getExpectedAttribute()
      Return the name of the expected session attribute, if any.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

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

      • HttpSessionRequiredException

        public HttpSessionRequiredException(java.lang.String msg)
        Create a new HttpSessionRequiredException.
        Parameters:
        msg - the detail message
      • HttpSessionRequiredException

        public HttpSessionRequiredException(java.lang.String msg,
                                            java.lang.String expectedAttribute)
        Create a new HttpSessionRequiredException.
        Parameters:
        msg - the detail message
        expectedAttribute - the name of the expected session attribute
        Since:
        4.3
    • Method Detail

      • getExpectedAttribute

        @Nullable
        public java.lang.String getExpectedAttribute()
        Return the name of the expected session attribute, if any.
        Since:
        4.3