Lines 263-269
Link Here
|
263 |
|
263 |
|
264 |
// Stage 3a - TLDs under WEB-INF (not lib or classes) |
264 |
// Stage 3a - TLDs under WEB-INF (not lib or classes) |
265 |
tldScanResourcePaths(WEB_INF); |
265 |
tldScanResourcePaths(WEB_INF); |
266 |
|
266 |
|
267 |
// Stages 3b & 4 |
267 |
// Stages 3b & 4 |
268 |
JarScanner jarScanner = context.getJarScanner(); |
268 |
JarScanner jarScanner = context.getJarScanner(); |
269 |
|
269 |
|
Lines 388-395
Link Here
|
388 |
* |
388 |
* |
389 |
* Keep in sync with o.a.j.comiler.TldLocationsCache |
389 |
* Keep in sync with o.a.j.comiler.TldLocationsCache |
390 |
*/ |
390 |
*/ |
391 |
private void tldScanResourcePaths(String startPath) { |
391 |
private boolean tldScanResourcePaths(String startPath) { |
392 |
|
392 |
|
|
|
393 |
boolean isFound = false; |
393 |
if (log.isTraceEnabled()) { |
394 |
if (log.isTraceEnabled()) { |
394 |
log.trace(sm.getString("tldConfig.webinfScan", startPath)); |
395 |
log.trace(sm.getString("tldConfig.webinfScan", startPath)); |
395 |
} |
396 |
} |
Lines 411-416
Link Here
|
411 |
!path.endsWith("implicit.tld")) { |
412 |
!path.endsWith("implicit.tld")) { |
412 |
continue; |
413 |
continue; |
413 |
} |
414 |
} |
|
|
415 |
isFound = true; |
414 |
InputStream stream = ctxt.getResourceAsStream(path); |
416 |
InputStream stream = ctxt.getResourceAsStream(path); |
415 |
try { |
417 |
try { |
416 |
XmlErrorHandler handler = tldScanStream(stream); |
418 |
XmlErrorHandler handler = tldScanStream(stream); |
Lines 432-437
Link Here
|
432 |
} |
434 |
} |
433 |
} |
435 |
} |
434 |
} |
436 |
} |
|
|
437 |
|
438 |
if(!isFound){ |
439 |
if (log.isDebugEnabled()) { |
440 |
log.debug(sm.getString("tldConfig.noTldInResourcePath", startPath)); |
441 |
} |
442 |
}else{ |
443 |
if (log.isDebugEnabled()) { |
444 |
log.debug(sm.getString("tldConfig.tldInResourcePath", startPath)); |
445 |
} |
446 |
} |
447 |
return isFound; |
435 |
} |
448 |
} |
436 |
|
449 |
|
437 |
/* |
450 |
/* |
Lines 455-461
Link Here
|
455 |
tldScanDir(fileList[i]); |
468 |
tldScanDir(fileList[i]); |
456 |
} else if (fileList[i].getAbsolutePath().endsWith(TLD_EXT)) { |
469 |
} else if (fileList[i].getAbsolutePath().endsWith(TLD_EXT)) { |
457 |
InputStream stream = null; |
470 |
InputStream stream = null; |
458 |
isFound = true; |
471 |
isFound = true; |
459 |
try { |
472 |
try { |
460 |
stream = new FileInputStream(fileList[i]); |
473 |
stream = new FileInputStream(fileList[i]); |
461 |
XmlErrorHandler handler = tldScanStream(stream); |
474 |
XmlErrorHandler handler = tldScanStream(stream); |
Lines 480-485
Link Here
|
480 |
if (log.isDebugEnabled()) { |
493 |
if (log.isDebugEnabled()) { |
481 |
log.debug(sm.getString("tldConfig.noTldInDir", start.getAbsolutePath())); |
494 |
log.debug(sm.getString("tldConfig.noTldInDir", start.getAbsolutePath())); |
482 |
} |
495 |
} |
|
|
496 |
}else{ |
497 |
if (log.isDebugEnabled()) { |
498 |
log.debug(sm.getString("tldConfig.tldInDir", |
499 |
start.getAbsolutePath())); |
500 |
} |
483 |
} |
501 |
} |
484 |
return isFound; |
502 |
return isFound; |
485 |
} |
503 |
} |
Lines 506-512
Link Here
|
506 |
while (entryName != null) { |
524 |
while (entryName != null) { |
507 |
if (entryName.startsWith("META-INF/") && |
525 |
if (entryName.startsWith("META-INF/") && |
508 |
entryName.endsWith(".tld")) { |
526 |
entryName.endsWith(".tld")) { |
509 |
isFound = true; |
527 |
isFound = true; |
510 |
is = null; |
528 |
is = null; |
511 |
try { |
529 |
try { |
512 |
is = jar.getEntryInputStream(); |
530 |
is = jar.getEntryInputStream(); |
Lines 530-535
Link Here
|
530 |
log.debug(sm.getString("tldConfig.noTldInJar", |
548 |
log.debug(sm.getString("tldConfig.noTldInJar", |
531 |
jarConn.getURL().getFile())); |
549 |
jarConn.getURL().getFile())); |
532 |
} |
550 |
} |
|
|
551 |
}else{ |
552 |
if (log.isDebugEnabled()) { |
553 |
log.debug(sm.getString("tldConfig.tldInJar", |
554 |
jarConn.getURL().getFile())); |
555 |
} |
533 |
} |
556 |
} |
534 |
} catch (IOException ioe) { |
557 |
} catch (IOException ioe) { |
535 |
log.warn(sm.getString("tldConfig.jarFail", jarConn.getURL()), ioe); |
558 |
log.warn(sm.getString("tldConfig.jarFail", jarConn.getURL()), ioe); |