Codota Logo
ViewNameMethodReturnValueHandler.isRedirectViewName
Code IndexAdd Codota to your IDE (free)

How to use
isRedirectViewName
method
in
org.springframework.web.servlet.mvc.method.annotation.ViewNameMethodReturnValueHandler

Best Java code snippets using org.springframework.web.servlet.mvc.method.annotation.ViewNameMethodReturnValueHandler.isRedirectViewName (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-framework

@Override
public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType,
    ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception {
  if (returnValue instanceof CharSequence) {
    String viewName = returnValue.toString();
    mavContainer.setViewName(viewName);
    if (isRedirectViewName(viewName)) {
      mavContainer.setRedirectModelScenario(true);
    }
  }
  else if (returnValue != null){
    // should not happen
    throw new UnsupportedOperationException("Unexpected return type: " +
        returnType.getParameterType().getName() + " in method: " + returnType.getMethod());
  }
}
origin: org.springframework/spring-webmvc

@Override
public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType,
    ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception {
  if (returnValue instanceof CharSequence) {
    String viewName = returnValue.toString();
    mavContainer.setViewName(viewName);
    if (isRedirectViewName(viewName)) {
      mavContainer.setRedirectModelScenario(true);
    }
  }
  else if (returnValue != null){
    // should not happen
    throw new UnsupportedOperationException("Unexpected return type: " +
        returnType.getParameterType().getName() + " in method: " + returnType.getMethod());
  }
}
origin: apache/servicemix-bundles

@Override
public void handleReturnValue(Object returnValue, MethodParameter returnType,
    ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception {
  if (returnValue instanceof CharSequence) {
    String viewName = returnValue.toString();
    mavContainer.setViewName(viewName);
    if (isRedirectViewName(viewName)) {
      mavContainer.setRedirectModelScenario(true);
    }
  }
  else if (returnValue != null){
    // should not happen
    throw new UnsupportedOperationException("Unexpected return type: " +
        returnType.getParameterType().getName() + " in method: " + returnType.getMethod());
  }
}
org.springframework.web.servlet.mvc.method.annotationViewNameMethodReturnValueHandlerisRedirectViewName

Javadoc

Whether the given view name is a redirect view reference. The default implementation checks the configured redirect patterns and also if the view name starts with the "redirect:" prefix.

Popular methods of ViewNameMethodReturnValueHandler

  • <init>
  • handleReturnValue
  • setRedirectPatterns
    Configure one more simple patterns (as described in PatternMatchUtils#simpleMatch) to use in order t
  • supportsReturnType

Popular in Java

  • Reactive rest calls using spring rest template
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now