Actually, this is supposed to work, i.e., you should be able to declare both standalone webapps as well as EAR-embedded web modules as the default-web-module of a virtual server.
We actually have a unit test for this feature, at:
/cvs/glassfish/appserv-tests/devtests/web/virtualServerEarWrappedDefaultWebModuleRestart
with these comments:
* Unit test for
*
*
https://glassfish.dev.java.net/issues/show_bug.cgi?id=542
* ("WAR from an EAR as default webapp no more working after stop/start")
*
* This unit test deploys an EAR, dynamically configures the EAR's embedded
* WAR as the default-web-module of virtual server "server", accesses the
* WAR's JSP resource under both the WAR's context root and the empty context
* root, stops and restarts the domain, and accesses the WAR's JSP resouce
* again (under both the WAR's context root and the empty context root).
For example, if mytest.ear contains mywar.war, and you want to declare the embedded mywar.war as the default-web-module of virtual server "server", you
would use "mytest#mywar.war" as the value of the default-web-module attribute of "server".
Jan
[Message sent by forum member 'jluehe' (jluehe)]
http://forums.java.net/jive/thread.jspa?messageID=252306