
Before you start the deployment process for a WAR component, it is obligatory that you set its context root property. After the WAR component is deployed, you can no longer modify its context root property.
As a Part of an EAR
As a Standalone Module for Deployment