首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

weblogic按索引发布应用

2012-10-24 
weblogic按目录发布应用weblogic按目录发布应用原来发布weblogic应用,都是按照war包去发布的,每次需要打包

weblogic按目录发布应用
weblogic按目录发布应用

原来发布weblogic应用,都是按照war包去发布的,每次需要打包,然后到weblogic上的console上去操作。麻烦得很。如果能像TOMCAT那样指向某目录发布就方便一些。我测试一下:
点击菜单中的
Tools---Configuration Wizard新建一个domain
Create a new weblogic domain   ----next
Generate a domain configured automatically to support the following products ----next
UserName:weblogic UserPassword:weblogic     ----next
Sun SDK 1.6.0_05 Development Mode -----next
domain name:cpmis ---next

启动刚刚新建的domain,菜单start admin server for weblogic server domain,登陆上管理界面
Deployment ----click
Install ----click
选择对应目录D:\project\CPMIS-Core\Code\Trunk\tasksupervisor\WebContent----next
Install this deployment as an application ---next
Name:tasksupervisor
choose I will make the deployment accessible from the following location   ---finish

由于我的WEB-INF/目录下有文件weblogic.xml如下:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<context-root>/tasksupervisor</context-root>
<container-descriptor>
   <prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>

访问页面http://localhost:7001/tasksupervisor,OK,可以正常访问了。

以上配置修改的内容,其实也可以从XML中去修改,比如路径上D:\bea\user_projects\domains\cpmis\config下面的config.xml如下:

<?xml version='1.0' encoding='UTF-8'?>
<domain xmlns="http://www.bea.com/ns/weblogic/920/domain" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90/security/wls http://www.bea.com/ns/weblogic/90/security/wls.xsd http://www.bea.com/ns/weblogic/920/domain http://www.bea.com/ns/weblogic/920/domain.xsd http://www.bea.com/ns/weblogic/90/security/xacml http://www.bea.com/ns/weblogic/90/security/xacml.xsd http://www.bea.com/ns/weblogic/90/security http://www.bea.com/ns/weblogic/90/security.xsd">
<name>cpmis</name>
<domain-version>10.3.0.0</domain-version>
<security-configuration>
    <name>cpmis</name>
    <realm>
      <sec:authentication-provider xsi:type="wls:default-authenticatorType"></sec:authentication-provider>
      <sec:authentication-provider xsi:type="wls:default-identity-asserterType">
        <sec:active-type>AuthenticatedUser</sec:active-type>
      </sec:authentication-provider>
      <sec:role-mapper xmlns:xac="http://www.bea.com/ns/weblogic/90/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper>
      <sec:authorizer xmlns:xac="http://www.bea.com/ns/weblogic/90/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer>
      <sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator>
      <sec:credential-mapper xsi:type="wls:default-credential-mapperType"></sec:credential-mapper>
      <sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider>
      <sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
      <sec:name>myrealm</sec:name>
    </realm>
    <default-realm>myrealm</default-realm>
    <credential-encrypted>{3DES}9dn0k1uOjF2d81DnZPLqpIGPmKmcOGqCUDeXeOQa/34zEHMTTtglOg1Rp5gfW9pPc3NgP1RwXESe4jO4Kr3TXbrpKvMtxcdK</credential-encrypted>
    <node-manager-username>weblogic</node-manager-username>
    <node-manager-password-encrypted>{3DES}YoV/Uv9HQHUU1hHQiNV2Pw==</node-manager-password-encrypted>
</security-configuration>
<server>
    <name>AdminServer</name>
    <listen-address></listen-address>
</server>
<embedded-ldap>
    <name>cpmis</name>
    <credential-encrypted>{3DES}ndiLdBQw7mkmI+kr6BxyQFssStmteM0wKqazctn1x/A=</credential-encrypted>
</embedded-ldap>
<configuration-version>10.3.0.0</configuration-version>
<app-deployment>
    <name>cpmis</name>
    <target>AdminServer</target>
    <module-type>war</module-type>
    <source-path>D:\project\CPMIS-Core\Code\Trunk\main\web</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    <staging-mode>nostage</staging-mode>
</app-deployment>
<app-deployment>
    <name>tasksupervisor</name>
    <target>AdminServer</target>
    <module-type>war</module-type>
    <source-path>D:\project\CPMIS-Core\Code\Trunk\tasksupervisor\WebContent</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    <staging-mode>nostage</staging-mode>
</app-deployment>
<admin-server-name>AdminServer</admin-server-name>
</domain>

热点排行