Changing Context Root in WebLogic

In this tutorial, we'll guide you through the process of changing the Context Root in WebLogic. This is essential when you want to modify the application path, making your application accessible under a different URL path.

Step 1 – Access WebLogic Admin Console

Start by accessing the WebLogic Admin Console. You can do this by navigating to the following URL in your browser:

https://your-domain:9002/console

Log in using your administrator credentials.

Step 2 – Navigate to Deployments

Once logged in, go to the Deployments section from the top-left side in the WebLogic Admin Console. This is where all your deployed applications are listed.

Step 3 – Select the Application

From the list of deployments, click on the application for which you want to change the Context Root. This will open the application's configuration page.

Step 4 – Go to Configuration Tab

In the application's configuration page, navigate to the Configuration tab and select the General sub-tab.

Step 5 – Enable Lock & Edit

Enable Lock & Edit from the top-left Change Center section.

Step 6 – Change Context Root

Scroll down at the bottom of the page to find the Context Root field. Enter the new context root (e.g., /newpath) that you want your application to use.

Click Save to apply the changes.

Step 7 – Update and Activate Changes

After saving the changes, go to the Change Center in the Admin Console and click Activate Changes to apply the new context root to your application.

Step 8 – Restart the Application

To ensure the changes take effect, you need to restart the application. You can do this from the Deployments section, then selecting Control tab by selecting the application and choosing the Stop > Force stop now and then Start > Servicing all requests options. Finally, don't forget to Release Configuration from the Change Center.

Step 9 – Verify the Changes

Finally, verify the changes by accessing your application using the new context root in the URL:

https://your-domain:7001/newpath

If the page loads successfully, the context root change has been applied correctly.