This blog introduces how to diagnose Agile PLM related issues.

  • March 10, 2015

Weblogic URL Redirect to Context Path

Jie Chen
Senior Principal Technical Support Engineer

To visit web application deployed in Weblogic, we usually access it through its context path like http://server/myapp . But many people expect the URL to be friendly and short enough as http://server only. Here is a very simple solution, deploy a separate simple web application with root context-root to achieve.

Note: this is not related to term of Proxy or Load Balancer.

A simple web application (say DummyApp) demonstrates the solution with following


To access this DummyApp, we have to input URL http://server/DummyApp . W can context-root as below to make it accessible through http://server only. That is to say, if access http://server , browser will redirect the request to http://server/DummyApp because we define it as the default application.

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">


A very simple web.xml to have a default welcome page index.html.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"





A simple static HTML page to redirect DummyApp to http://server/myapp , using HTML meta with the http-equiv parameter set to "refresh".

<meta http-equiv="refresh" content="0;url=/myapp">

How it works

When we access http://server, Weblogic will redirect our request to its default application DummyApp's index.html, that is http://server/DummyApp/index.html . And index.html immediately routes to http://server/myapp as we expect.

Join the discussion

Comments ( 1 )
  • Firoz Tuesday, January 30, 2018
    working on Java Spring
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.