users@glassfish.java.net

Re: How to deploy a WAR as the default application on the default server?

From: <glassfish_at_javadesktop.org>
Date: Sun, 06 Apr 2008 04:20:21 PDT

I think the step to switch your web archive to be the default app is not necessary.

If you deploy whatever.war and sun-web.xml states that it should use the root context "/" than this webapp will get served automatically whenever anyone requests a url like "http://www.yourserver.com". This is because your app uses the root context and thus "your web server is now running" shouldn't be display anymore.

Of course your web.xml should contain a "<welcome-file-list>"-element to point to the entry point of your app.

This is exactly what I am doing on my virtual servers (I use four virtual servers).

If I query Glassfish using "asadmin get *.default-web-module" I get a list that contains only empty entries. But any request to any of my domains gets answered by the respective web app.

Maybe my blog post about virtual servers might help:
http://weblogs.java.net/blog/writtmeyer/archive/2008/02/virtual_servers.html
[Message sent by forum member 'writtmeyer' (writtmeyer)]

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