Package org.springframework.web

Examples of org.springframework.web.HttpSessionRequiredException


    }

    // 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


      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

      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

    }

    // 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

    }

    // 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.getSimpleName());
    }

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

            if (sessionAttributeSet != null &&
                (sessionAttributeSet.contains(attrName) || sessionAttributeSet.contains(param.getParameterType())) &&
                !implicitModel.containsKey(attrName)) {
              HttpSession session = request.getSession(false);
              if (session == null) {
                throw new HttpSessionRequiredException(
                    "No session found - session required for attribute '" + attrName + "'");
              }
              Object sessionAttr = sessionAttributeStore.retrieveAttribute(webRequest, attrName);
              if (sessionAttr == null) {
                throw new HttpSessionRequiredException(
                    "Session attribute '" + attrName + "' required - not found in session");
              }
              sessionAttrNames.add(attrName);
              implicitModel.addAttribute(attrName, sessionAttr);
            }
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

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

    @Override
    protected void raiseSessionRequiredException(String message) throws Exception {
      throw new HttpSessionRequiredException(message);
    }
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.