Package org.springframework.web

Examples of org.springframework.web.HttpSessionRequiredException


    }

    // Session-form mode: retrieve form object from HTTP session attribute.
    HttpSession session = request.getSession(false);
    if (session == null) {
      throw new HttpSessionRequiredException("Must have session when trying to bind (in session-form mode)");
    }
    String formAttrName = getFormSessionAttributeName(request);
    Object sessionFormObject = session.getAttribute(formAttrName);
    if (sessionFormObject == null) {
      throw new HttpSessionRequiredException("Form object not found in session (in session-form mode)");
    }

    // Remove form object from HTTP session: we might finish the form workflow
    // in this request. If it turns out that we need to show the form view again,
    // we'll re-bind the form object to the HTTP session.
View Full Code Here


      params.add(response);

      if (paramTypes.length >= 3 && paramTypes[2].equals(HttpSession.class)) {
        HttpSession session = request.getSession(false);
        if (session == null) {
          throw new HttpSessionRequiredException(
              "Pre-existing session required for handler method '" + methodName + "'");
        }
        params.add(session);
      }
View Full Code Here

    }

    // Check whether a session is required.
    if (this.requireSession) {
      if (request.getSession(false) == null) {
        throw new HttpSessionRequiredException("Pre-existing session required but none found");
      }
    }

    // Do declarative cache control.
    // Revalidate if the controller supports last-modified.
View Full Code Here

      throw new MissingServletRequestParameterException(paramName, paramType.getName());
    }

    @Override
    protected void raiseSessionRequiredException(String message) throws Exception {
      throw new HttpSessionRequiredException(message);
    }
View Full Code Here

        }

        // Session-form mode: retrieve form object from HTTP session attribute.
        HttpSession session = request.getSession(false);
        if (session == null) {
            throw new HttpSessionRequiredException("Must have session when trying to bind (in session-form mode)");
        }
        String formAttrName = getFormSessionAttributeName(request);
        Object sessionFormObject = session.getAttribute(formAttrName);
        if (sessionFormObject == null) {
            throw new HttpSessionRequiredException("Form object not found in session (in session-form mode)");
        }

        // Remove form object from HTTP session: we might finish the form workflow
        // in this request. If it turns out that we need to show the form view again,
        // we'll re-bind the form object to the HTTP session.
View Full Code Here

      params.add(response);

      if (paramTypes.length >= 3 && paramTypes[2].equals(HttpSession.class)) {
        HttpSession session = request.getSession(false);
        if (session == null) {
          throw new HttpSessionRequiredException(
              "Pre-existing session required for handler method '" + methodName + "'");
        }
        params.add(session);
      }
View Full Code Here

    for (String name : findSessionAttributeArguments(handlerMethod)) {
      if (!mavContainer.containsAttribute(name)) {
        Object value = this.sessionAttributesHandler.retrieveAttribute(request, name);
        if (value == null) {
          throw new HttpSessionRequiredException("Expected session attribute '" + name + "'");
        }
        mavContainer.addAttribute(name, value);
      }
    }
  }
View Full Code Here

      throw new MissingServletRequestParameterException(paramName, paramType.getSimpleName());
    }

    @Override
    protected void raiseSessionRequiredException(String message) throws Exception {
      throw new HttpSessionRequiredException(message);
    }
View Full Code Here

    }

    // Check whether a session is required.
    if (this.requireSession) {
      if (request.getSession(false) == null) {
        throw new HttpSessionRequiredException("Pre-existing session required but none found");
      }
    }

    // Do declarative cache control.
    // Revalidate if the controller supports last-modified.
View Full Code Here

    }

    // Session-form mode: retrieve form object from HTTP session attribute.
    HttpSession session = request.getSession(false);
    if (session == null) {
      throw new HttpSessionRequiredException("Must have session when trying to bind (in session-form mode)");
    }
    String formAttrName = getFormSessionAttributeName(request);
    Object sessionFormObject = session.getAttribute(formAttrName);
    if (sessionFormObject == null) {
      throw new HttpSessionRequiredException("Form object not found in session (in session-form mode)");
    }

    // Remove form object from HTTP session: we might finish the form workflow
    // in this request. If it turns out that we need to show the form view again,
    // we'll re-bind the form object to the HTTP session.
View Full Code Here

TOP

Related Classes of org.springframework.web.HttpSessionRequiredException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.