tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: servlet spec section 9.5 question
Date Tue, 11 Sep 2001 19:11:55 GMT


On Tue, 11 Sep 2001, Kevin HaleBoyes wrote:

> Date: Tue, 11 Sep 2001 19:57:10 +0100 (BST)
> From: Kevin HaleBoyes <kcboyes@yahoo.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: servlet spec section 9.5 question
>
> I've started looking into deploying a WAR file to
> distribute my application.  I used the "dist" target
> from the sample build.xml file in the tomcat documentation
> to build the WAR file itself (app.name is opf):
>
>     <jar jarfile="${dist.home}/${app.name}.war"
>          basedir="${deploy.home}"/>
>
> I put the opf.war file into the webapps directory and
> restarted the server and everything worked great!
>
> I also had a look at the contents of the file and noticed
> the standard META-INF directory.  But,
> section 9.5 of the Servlet 2.3 PFD specification says
>
>    "... a META-INF directotry will be present which contains
>     information useful to the Java Archive tools.  If this
>     directory is present, the servlet container must not allow
>     it be served as content to a web client's request"
>
> If I'm interpreting this correctly, what I tried above shouldn't
> have worked since the .war file _did_ contain a META-INF directory.
> I'm using RedHat 7.1 and Tomcat 4.0 RC1.
>

It should still work (as you found).  What should *not* work is a client
request like this:

  http://localhost:8080/opf/META-INF/MANIFEST.MF

In other words, the container should not allow a *client* to access
anything under META-INF (or WEB-INF) through an HTTP request.

> Does anyone have any thoughts on this?
>
> Kevin HaleBoyes
>

Craig


Mime
View raw message