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

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

Introduction

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

Prototype

@Override
    public final void setServletContext(ServletContext servletContext) 

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 .  j  av  a 2 s.com
    return view;
}