Hi,

Jay SenSharma

Jay SenSharma

Many times we want to enter the following URL to access our Applications:   http://localhost:7001 rather than specifying something like  http://localhost:7001/MyContextRoot and Our Application should be accessed… Without Actually entering/specifying the ContetRoot in the URL. This thing is possible in two Ways:

OPTION-1). Please assign the “context-root” element value as /
It will make your WebApplication a default web application on the server..
To change context root in weblogic.xml following entry is needed:
Example:

<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<context-root>/</context-root>
</weblogic-web-app>

.

OPTION-2). If you don’t want to change your “weblogic.xml” then Please login to admin console—
Servers—>YourManagedServerName(Click)—>Protocol (Tab)—>Http (Sub Tab)—>Default WebApp Context Root:

NOTE: In the above Field Please specify your WebApplications Context Root Preceding by forward slash (Example: /MyContextRoot)…sothat after Server restart that Application will become your Servers Default WebApp….

For better results .. Please add the “welcome-page” inside your “web.xml” like following:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>SpringOne</display-name>
<welcome-file-list>
<welcome-file>YourWelcomePage.jsp</welcome-file>
</welcome-file-list>
</web-app>

NOTE: Please donot try to make your “WebLogic Admin Console” as a Default Application…

.

.

Thanks

Jay SenSharma

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.