Anyone wanting to run a JSF app on GlassFish may run into problems when migrating to production, if they are hosting multiple domains on their servers by using virtual hosts!
The default deployment, deploys your app to all virtual servers (except _asadmin). If you do that, you get lots of errors, and the app doesn’t run.
The solution is easy, simply add the –virtualservers argument to the "deploy" command in the "asadmin" console, and supply the relevant virtual server (just the one).
Hopefully this will get fixed in GFv3.1!