public static GrailsApplication lookupApplication(ServletContext servletContext) {
        WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
        return (GrailsApplication)wac.getBean(GrailsApplication.APPLICATION_ID);
    }
public static GrailsApplication lookupApplication ( ServletContext servletContext ) { WebApplicationContext wac = WebApplicationContextUtils . getRequiredWebApplicationContext ( servletContext ) ; return ( GrailsApplication ) wac . getBean ( GrailsApplication . APPLICATION_ID ) ; }
Looks up the GrailsApplication instance

@return The GrailsApplication instance