I thought I’d toss this out in case anyone has any
thoughts or experience. I’ve found that with some WAR files
(produced in a way that I’m still investigating), there are not entries
in the WAR’s table for directories; whereas with WARs I create with jar
and winzip and my command-line zip, there are directory entries. For
example, in the output below from a normal war, you can see an entry for
WEB-INF/ itself.
Why does this matter? Well it comes up when we use ServletContext.getResourcePaths.
On Tomcat, WebSphere, WebLogic 8.1 SP2, etc. we are able to get a list of the
files in the dir WEB-INF/bob by calling getResourcePaths and passing in “/WEB-INF/bob/”.
Works fine. However, with WLS SP4, they made a “fix” and now
for the abnormal WARs (those without dir entries), this doesn’t work!
The workaround is to unjar/zip, then rejar/zip the war, or
even just update the files in the bob dir using jar, winzip, zip. But who
is at fault here? Is it a WAR/jar requirement to have directory entries
in the WAR? In which case the problem is with the creator of these abnormal
WARs. Or is this a regression in WLS?
> jar tf Bob_bad.war | grep WEB-INF
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/Message.properties
…
WEB-INF/bob/
WEB-INF/bob/Bob1.xml
WEB-INF/bob/Bob2.xml
WEB-INF/web.xml
http://e-docs.bea.com/wls/docs81/notes/new.html#1202654
Thanks, Joe