要配置Weblogic8.1的缺省應用,需要為相應的Web Application的WEB-INF目錄下加上相應的配置文件信息。
1、對于以ear形式發(fā)布的web application,在application.xml中加入:
<web>
<web-uri>yourAppName</web-uri>
<context-root>/</context-root>
</web>
2、對于以目錄形式發(fā)布的web application,可以在weblogic.xml里面配置:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<container-descriptor>
<index-directory-enabled>true</index-directory-enabled>
</container-descriptor>
<context-root>/</context-root>
</weblogic-web-app>
注意:application.xml里面的配置將會(huì )覆蓋掉weblogic.xml的配置信息(Note that the application.xml context-root takes precedent over the weblogic.xml value.)
bea關(guān)于default web application的說(shuō)明:
http://e-docs.bea.com/wls/docs81/ConsoleHelp/web_applications.html
Designating a 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.
Deploy the application using the instructions in Deploying a New Web Application.
To deploy a Web Application as part of an .ear archive or exploded .ear, see Deploying WebLogic Server Applications.
聯(lián)系客服