public String getMimeType(String resourcePath) { if (resourcePath != null) { String extension = StringUtils.getExtension(resourcePath); if (extension.length() < resourcePath.length()) { String retVal = (String) _mimeMappings.get(extension); /*no local mimetype we try the servlet context mime type*/ if (retVal == null) { /** * we check for the underlying container mimetype if we dont have a valid one * set via our overrides */ retVal = _container.getContainerMimeType(resourcePath); } return retVal; } } return null; }
public String getMimeType(String resourcePath) { if (resourcePath != null) { String extension = StringUtils.getExtension(resourcePath); if (extension.length() < resourcePath.length()) { String retVal = (String) _mimeMappings.get(extension); /*no local mimetype we try the servlet context mime type*/ if (retVal == null) { /** * we check for the underlying container mimetype if we dont have a valid one * set via our overrides */ retVal = _container.getContainerMimeType(resourcePath); } return retVal; } } return null; }