Package org.springframework.web.bind
Class MissingRequestCookieException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.bind.ServletRequestBindingException
org.springframework.web.bind.MissingRequestValueException
org.springframework.web.bind.MissingRequestCookieException
- All Implemented Interfaces:
- Serializable,- ErrorResponse
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:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.web.ErrorResponseErrorResponse.Builder
- 
Constructor SummaryConstructorsConstructorDescriptionMissingRequestCookieException(String cookieName, org.springframework.core.MethodParameter parameter) Constructor for MissingRequestCookieException.MissingRequestCookieException(String cookieName, org.springframework.core.MethodParameter parameter, boolean missingAfterConversion) Constructor for use when a value was present but converted tonull.
- 
Method SummaryModifier and TypeMethodDescriptionfinal StringReturn the expected name of the request cookie.final org.springframework.core.MethodParameterReturn the method parameter bound to the request cookie.Methods inherited from class org.springframework.web.bind.MissingRequestValueExceptionisMissingAfterConversionMethods inherited from class org.springframework.web.bind.ServletRequestBindingExceptiongetBody, getDetailMessageArguments, getDetailMessageCode, getStatusCodeMethods inherited from class jakarta.servlet.ServletExceptiongetRootCauseMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.web.ErrorResponsegetDetailMessageArguments, getHeaders, getTitleMessageCode, getTypeMessageCode, updateAndGetBody
- 
Constructor Details- 
MissingRequestCookieExceptionpublic MissingRequestCookieException(String cookieName, org.springframework.core.MethodParameter parameter) Constructor for MissingRequestCookieException.- Parameters:
- cookieName- the name of the missing request cookie
- parameter- the method parameter
 
- 
MissingRequestCookieExceptionpublic MissingRequestCookieException(String cookieName, org.springframework.core.MethodParameter parameter, boolean missingAfterConversion) Constructor for use when a value was present but converted tonull.- 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- Overrides:
- getMessagein class- Throwable
 
- 
getCookieNameReturn the expected name of the request cookie.
- 
getParameterpublic final org.springframework.core.MethodParameter getParameter()Return the method parameter bound to the request cookie.
 
-