Class MissingRequestCookieException

All Implemented Interfaces:
Serializable, ErrorResponse

public class MissingRequestCookieException extends MissingRequestValueException
ServletRequestBindingException subclass that indicates that a request cookie expected in the method parameters of an @RequestMapping method is not present.
Since:
5.1
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • MissingRequestCookieException

      public MissingRequestCookieException(String cookieName, MethodParameter parameter)
      Constructor for MissingRequestCookieException.
      Parameters:
      cookieName - the name of the missing request cookie
      parameter - the method parameter
    • MissingRequestCookieException

      public MissingRequestCookieException(String cookieName, MethodParameter parameter, boolean missingAfterConversion)
      Constructor for use when a value was present but converted to null.
      Parameters:
      cookieName - the name of the missing request cookie
      parameter - the method parameter
      missingAfterConversion - whether the value became null after conversion
      Since:
      5.3.6
  • Method Details

    • getMessage

      public String getMessage()
      Description copied from class: NestedServletException
      Return the detail message, including the message from the nested exception if there is one.
      Overrides:
      getMessage in class NestedServletException
    • getCookieName

      public final String getCookieName()
      Return the expected name of the request cookie.
    • getParameter

      public final MethodParameter getParameter()
      Return the method parameter bound to the request cookie.