Jar jar;
try {
jar = tldResourcePath.getJar();
} catch (IOException ioe) {
throw new JasperException(ioe);
}
// Add the dependencies on the TLD to the referencing page
PageInfo pageInfo = ctxt.createCompiler().getPageInfo();
if (pageInfo != null) {
String path = tldResourcePath.getWebappPath();
// Add TLD (jar==null) / JAR (jar!=null) file to dependency list
pageInfo.addDependant(path, ctxt.getLastModified(path));
if (jar != null) {
// Add TLD within the JAR to the dependency list
String entryName = tldResourcePath.getEntryName();
try {
pageInfo.addDependant(jar.getURL(entryName),
Long.valueOf(jar.getLastModified(entryName)));
} catch (IOException ioe) {
throw new JasperException(ioe);
}
}
}
// Get the representation of the TLD