users@glassfish.java.net

Re: Glassfish deployment problem

From: <glassfish_at_javadesktop.org>
Date: Thu, 28 Jan 2010 11:03:25 PST

I see.
In v2, a web archive is recognized by the following:
1. end with ."war" suffix
Or
2. contains WEB-INF/web.xml or WEB-INF/sun-web.xml

In your case, the contents of the archive do not contain WEB-INF/web.xml or WEB-INF/sun-web.xml. So when it's deployed as .war file, it can be recognized as a web archive with the suffix and when it's deployed as a directory, it cannot be recognized.

You need to put a WEB-INF/web.xml (you can put a dummy one) to indicate to the server this is a web archive if you want to use directory deployment.
[Message sent by forum member 'hzhang_jn' (hong.zhang_at_sun.com)]

http://forums.java.net/jive/thread.jspa?messageID=383547