Deployment specific web application configuration usingcontext.xml in GlassFish was addeda couple of months ago but related questions keep coming up on mailing lists and forumso I've decided to blog about it so it's easy to point out. ;-)
Similar to Tomcatyou can define your context.xml as follows.
1. Global context.xmlglassfish/domains/domain1/config/context.xml which will be loaded by *all* webapps.
For example, global context.xml can define global environment entry to be shared across all webapps as follows.