List of usage examples for com.liferay.portal.kernel.servlet ServletContextUtil getResourcePath
public static String getResourcePath(URL url) throws URISyntaxException
From source file:com.liferay.rtl.servlet.filters.ComboServletFilter.java
License:Open Source License
protected URL getResourceURL(ServletContext servletContext, String rootPath, String path) throws Exception { URL url = servletContext.getResource(path); if (url == null) { return null; }/*w w w .j av a 2s .com*/ String filePath = ServletContextUtil.getResourcePath(url); int pos = filePath.indexOf(rootPath.concat(StringPool.SLASH).concat(_JAVASCRIPT_DIR)); if (pos == 0) { return url; } return null; }