Example usage for org.springframework.web.context WebApplicationContext getDisplayName

List of usage examples for org.springframework.web.context WebApplicationContext getDisplayName

Introduction

In this page you can find the example usage for org.springframework.web.context WebApplicationContext getDisplayName.

Prototype

String getDisplayName();

Source Link

Document

Return a friendly name for this context.

Usage

From source file:example.WacuController.java

public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {

    WebApplicationContext wac = WebApplicationContextUtils
            .getRequiredWebApplicationContext(this.servletContext);

    return new ModelAndView("wacu")//

            .addObject("applicationContextDisplayName", wac.getDisplayName())//

            .addObject("applicationContextClassName", wac.getClass().getName());

}