Weblogic8.1缺省应用配置

在Weblogic7中,要配置某个应用作为缺省应用(DefaultWebApplication)的话,只需要在控制台(Console)界面上进行设置即可。但Weblogic8.1的控制台里面似乎找不到这个选项了。直接修改config.xml也无法达到目的。

要配置Weblogic8.1的缺省应用,需要为相应的Web Application的WEB-INF目录下加上相应的配置文件信息。

1、对于以ear形式发布的web application,在application.xml中加入:
<web>
  <web-uri>yourAppName</web-uri>
  <context-root>/</context-root>
</web>

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

<!DOCTYPEweblogic-web-appPUBLIC "-//BEA Systems, Inc.//DTD Web Application8.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里面的配置将会覆盖掉weblogic.xml的配置信息(Note thattheapplication.xml context-root takes precedent over theweblogic.xmlvalue.)

bea关于default web application的说明:

http://e-docs.bea.com/wls/docs81/ConsoleHelp/web_applications.html

Designating a Default Web Application

Thedefault Web Application is presented to clients who do notspecify a URI(or specify "/" as the URI). To deploy a Web Applicationas a defaultWeb Application, set the value of the context-root elementto "/" in itsdeployment descriptor.

You can specify the context-root elementin the weblogic.xmldeployment descriptor for Web Applications that arepackaged as a .wararchive or exploded .war directory. If you packagethe Web Applicationas part of an Enterprise Application (.ear archiveor exploded .ear),specify the context-root in application.xml. Notethat theapplication.xml context-root takes precedent over theweblogic.xmlvalue.

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.

转载请保留原始链接:http://www.zeali.net/blog/entry.php?id=135

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值