First about the context root. When you use the web app from within an ear you have to define the context-root in the sun-application.xml file.
The other problem you are running into is probably this issue:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=4407
The issue has been fixed but has not been released. If I understand Jan Luehe's last comment he has made to this issue correctly, it is fixed in the latest builds of the V2.1 branch.
--
Wolfram Rittmeyer
[Message sent by forum member 'writtmeyer' (writtmeyer)]
http://forums.java.net/jive/thread.jspa?messageID=269343