[jboss-dev-forums] [Design of POJO Server] - Re: AbstractJarHandler.isFile/isDirectory and isArchive
scott.stark@jboss.org
do-not-reply at jboss.com
Wed Sep 13 23:07:39 EDT 2006
isArchive uses:
- JARStructure,
+ expects jars to be directories (isDirectory == true).
+ expects directories that are not also archives (unpacked jars) to have a META-INF to be recognized.
- WebInfLibFilter,
+ accepts isArchive == true as a lib jar
+ file.isDirectory() == true && JarUtils.isArchive(file.getName()) as a lib jar.
These are too lax and violate the servlet spec as only .jar archives are to be accepted to strictly conform to the spec (JBAS-2538).
- AbstractDeploymentContext,
+ A non-archive, non-directory root is defaulted to the metadata location if one has not been set.
other isDirectory uses:
- WARStructure,
+ expects jars to be directories (isDirectory == true) and further filers on .war or WEB-INF existence.
The general features we need are:
- does a file have children
- does a file have an input stream, and what is its encoding
Marking a file as a directory via isDirectory could achieve the first. I would like to drop the isArchive attribute and add a contentType instead. A null contentType implies there is no meaningful input stream and one would expect null or an error if it was requested.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971454#3971454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971454
More information about the jboss-dev-forums
mailing list