Example usage for org.springframework.web.servlet.view RedirectView setApplicationContext

List of usage examples for org.springframework.web.servlet.view RedirectView setApplicationContext

Introduction

In this page you can find the example usage for org.springframework.web.servlet.view RedirectView setApplicationContext.

Prototype

@Override
    public final void setApplicationContext(@Nullable ApplicationContext context) throws BeansException 

Source Link

Usage

From source file:org.wallride.web.support.ExtendedThymeleafViewResolver.java

@Override
protected View createView(final String viewName, final Locale locale) throws Exception {
    View view = super.createView(viewName, locale);
    if (view instanceof RedirectView) {
        RedirectView redirectView = (RedirectView) view;
        redirectView.setApplicationContext(getApplicationContext());
        redirectView.setServletContext(getServletContext());
    }//from  w w  w.  java 2 s  . co m
    return view;
}