aspose file tools*
The moose likes BEA/Weblogic and the fly likes application.xml /context-root/weblogic.xml question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "application.xml /context-root/weblogic.xml question" Watch "application.xml /context-root/weblogic.xml question" New topic
Author

application.xml /context-root/weblogic.xml question

Deepak Dew
Ranch Hand

Joined: Mar 29, 2004
Posts: 79
Hi,
I have a question regarding application.xml and weblogic.xml.
Suppose, my application has one .war/web-app file.
In application.xml, I have one element called <module>
where I have to define my web-app/war file like

<web>
<web-uri>petStore.war</web-uri>
<context-root>estore</context-root>
</web>

Even, inside my web-app, in its weblogic.xml, I define the context root for the web app, say it is defined as <context-root>xyz</context-root> inside web.xml.
So, basically, I have two context roots for the same web-app, one in the application.xml and other at the weblogic.xml.
My question is how would the end client access this web-app or how would be the url going to be?

Thanks

Deepak


IBM Certified Advance WAS Administrator on 6.1, BEA Certified WebLogic Server 81 Administrator, Vitria Certified BusinessWorks Administrator, SCJP 2
Deepak Dew
Ranch Hand

Joined: Mar 29, 2004
Posts: 79
Hi
I got the answer. Here it is:


The context-root element defines the context root of this stand-alone
Web Application. If the Web application is part of an EAR, not
stand-alone, specify the context root in the EAR's application.xml
file. A context-root setting in application.xml takes precedence over
context-root setting in weblogic.xml.

Note that this weblogic.xml element only acts on deployments using the
two-phase deployment model. See "Two-Phase Deployment" in Developing
WebLogic Server Applications.

The order of precedence for context root determination for a Web
application is as follows:

Check application.xml for context root; if found, use as Web
application's context root.

If context root is not set in application.xml, and the Web application
is being deployed as part of an EAR, check whether context root is
defined in weblogic.xml. If found, use as Web application's context
root. If the web-app is deployed standalone, application.xml won't
come into play and the determination for context-root starts at
weblogic.xml and defaults to URI if it is not defined there.

If context root is not defined in weblogic.xml or application.xmll,
then infer the context path from the URI, giving it the name of the
value defined in the URI minus the WAR suffix. For instance, a URI
MyWebApp.war would be named MyWebApp.

When subsequent Web Applications have context root names that would
duplicate a context root name already in use, a number is appended to
the would-be duplicates. For instance if MyWebApp is already in use,
another Web Application whose context root would be named MyWebApp is
instead called MyWebApp-1, to be followed if necessary by MyWebApp-2,
and so on.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: application.xml /context-root/weblogic.xml question