Weblogic8.1缺省应用配置

来源:百度文库 编辑:神马文学网 时间:2024/03/29 20:28:48
Weblogic8.1缺省应用配置

在Weblogic7中,要配置某个应用作为缺省应用(Default Web Application)的话,只需要在控制台(Console)界面上进行设置即可。但Weblogic8.1的控制台里面似乎找不到这个选项了。 直接修改config.xml也无法达到目的。
要配置Weblogic8.1的缺省应用,需要为相应的Web Application的WEB-INF目录下加上相应的配置文件信息。
1、对于以ear形式发布的web application,在application.xml中加入:

yourAppName
/

2、对于以目录形式发布的web application,可以在weblogic.xml里面配置:



true

/

注意:application.xml里面的配置将会覆盖掉weblogic.xml的配置信息(Note that the application.xml context-root takes precedent over the weblogic.xml value.)
bea关于default web application的说明:
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.