To determine the context root of an application
- In the left panel of the WebSphere admin console, expand Applications > Application Types.
- Select Websphere enterprise applications.
- Select your application.
- Select Context Root or Web Modules. The context root will be displayed.
For example, the context root of the Beta application is /beta.
To display the application in a browser, you need to know the hostname, port, and context root. For example, if the hostname is www.example.com, the port is 9080, and the context root is /beta, you would be able to display the application by navigating to www.example.com:9080/beta.
Change context root
The context root can be changed by selecting Applications > All Applications > app > Context root for web modules, and then changing the context root, and then restarting the JVMs. However, this is not an ideal solution, because the context root would need to be fixed everytime the EAR is deployed. A much more reasonable solution will be to correct the context root in the application.xml file in the application developer tool, such as Eclipse.
For example, if you want to change the context root of the Beta application to be /home, it would be ideal to change the context root in the tool that was used to developer the Beta application (such as Eclipse). In this example, the context root is changed to be /home in Eclipse, and then a new EAR is created. Technically, when the new EAR is deployed, the deployment descriptor will have the new context root of /home.
The next time the EAR is deployed to WebSphere, the context root will be /home by default.
And the application will be able to be requested using the new context root.