private long[] getLastModified(TldResourcePath tldResourcePath) { long[] result = new long[2]; result[0] = -1; result[1] = -1; try { URL url = servletContext.getResource(tldResourcePath.getWebappPath()); URLConnection conn = url.openConnection(); result[0] = conn.getLastModified(); if ("file".equals(url.getProtocol())) { // Reading the last modified time opens an input stream so we // need to make sure it is closed again otherwise the TLD file // will be locked until GC runs. conn.getInputStream().close(); } Jar jar = tldResourcePath.getJar(); if (jar != null) { result[1] = jar.getLastModified(tldResourcePath.getEntryName()); } } catch (IOException e) { // Ignore (shouldn't happen) } return result; }
jar = tldResourcePath.getJar(); } catch (IOException ioe) { throw new JasperException(ioe);
Jar jar; try { jar = tldResourcePath.getJar(); } catch (IOException ioe) { throw new JasperException(ioe);
try { tagJar = compiler.getCompilationContext().getTldResourcePath( tagInfo.getTagLibrary().getURI()).getJar(); } catch (IOException ioe) { throw new JasperException(ioe);