public static URL getResourceBundleURL ( String resourcePath , ServletContext servletContext ) { URL resourceUrl = null ; try { resourceUrl = ClassLoaderResourceUtils . getResourceURL ( resourcePath , LocaleUtils . class ) ; } catch ( Exception e ) { // Nothing to do } if ( resourceUrl == null && servletContext != null && resourcePath . startsWith ( "grails-app/" ) ) { try { resourceUrl = servletContext . getResource ( "/WEB-INF/" + resourcePath ) ; } catch ( MalformedURLException e ) { // Nothing to do } } return resourceUrl ; }
Returns the resource bundle URL