Monday, October 18, 2010

How to make application deployed in weblogic as default web application?

 The default Web Application is presented to clients who do not specify a URI (or specify "/" as the URI). To deploy a Web Application as a default Web Application, set the value of the context-root element to "/" in its deployment descriptor.


You can specify the context-root element in the weblogic.xml deployment descriptor for Web Applications that are packaged as a .war archive or exploded .war directory. 

If you package the Web Application as part of an Enterprise Application (.ear archive or exploded .ear), specify the context-root in application.xml. Note that the application.xml context-root takes precedent over the weblogic.xml value.

<?xml version=’1.0′ encoding=’UTF-8′?>
<weblogic-web-app xmlns=”″ xmlns:xsi=””>
<context-root>/</context-root> </weblogic-web-app>

To test this:
Enter the URL in the browser after successfully configured as explianed above:
Note: No need to mention the application name after /.

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)…so that 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=”” xmlns=”” xmlns:web=”” xsi:schemaLocation=”” id=”WebApp_ID” version=”2.5″>

No comments:

Post a Comment