List of usage examples for org.springframework.web HttpSessionRequiredException getMessage
public String getMessage()
From source file:org.cloudfoundry.identity.uaa.oauth.UaaAuthorizationEndpoint.java
@ExceptionHandler(HttpSessionRequiredException.class) public ModelAndView handleHttpSessionRequiredException(HttpSessionRequiredException e, ServletWebRequest webRequest) throws Exception { logger.info("Handling Session required error: " + e.getMessage()); return handleException(new AccessDeniedException("Could not obtain authorization request from session", e), webRequest);/*from w w w .j a v a 2 s . c o m*/ }
From source file:org.springframework.web.servlet.mvc.generic.GenericFormController.java
/** * Handles two cases: form submissions and showing a new form. * Delegates the decision between the two to {@link #isFormSubmission}, * always treating requests without existing form session attribute * as new form when using session form mode. * @see #isFormSubmission/*from w w w . j a v a 2 s . c om*/ * @see #showNewForm * @see #processFormSubmission */ public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { // Form submission or new form to show? if (isFormSubmission(request)) { // Fetch form object from HTTP session, bind, validate, process submission. try { return processFormSubmission(request); } catch (HttpSessionRequiredException ex) { // Cannot submit a session form if no form object is in the session. if (logger.isDebugEnabled()) { logger.debug("Invalid submit detected: " + ex.getMessage()); } return handleInvalidSubmit(request); } } else { // New form to show: render form view. return showNewForm(request); } }