Edoc中说可以通过如下格式部署应用:

java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic
   -password weblogic -name mytestear -stage -targets mycluster
   -deploy c:beaweblogic81samplesservermedrecddistphysicianEar

 

然而, 经过测试, 发现http://localhost:7001根本不能连通, 倒是改为localhost:7001后运行OK. 测试环境 WebLogic 11gR1(10.3.3).

通过的例子:

java weblogic.Deployer -adminurl localhost:7001 -user weblogic -password weblogic1 -deploy D:WorkspacesMyEclipsewebtestWebRoot 那么如何才能连通呢? 需要启用AdminServer的HTTP隧道功能, 操作步骤:

AdminServer的设置–>协议标签–>HTTP标签–>启用隧道复选框(指定是否应为此服务器启用通过 T3, T3S, HTTP, HTTPS, IIOP 和 IIOPS 协议进行的隧道通信。)

即可, 默认情况下未启用HTTP隧道.

相关文档地址: http://download.oracle.com/docs/cd/E13222_01/wls/docs92/deployment/deploy.html 中文地址: http://edocs.weblogicfans.net/wls/docs92/deployment/wldeployer.html

其它文档(转自forest_hou):

weblogic.Deployer Examples:

To deploy a new application:

java weblogic.Deployer -adminurl t3://localhost:7001

     -username system -password weblogic  
                   -name app -source /myapp/app.ear

     -targets server1,server2 -deploy

To redeploy an application:

java weblogic.Deployer -adminurl t3://localhost:7001

     -username system -password weblogic -name app –redeploy

To redeploy part of an application:

java weblogic.Deployer -adminurl t3://localhost:7001

     -username system -password weblogic

     -targets server1,server2 -redeploy jsps/*.jsp

To undeploy an application:

java weblogic.Deployer -adminurl t3://localhost:7001

     -username system -password weblogic -undeploy

     -name myapp –targets server1,server2

To list all deployed applications:

java weblogic.Deployer -adminurl t3://localhost:7001

     -username system -password weblogic -listapps

To list all deployment tasks:

java weblogic.Deployer -adminurl http://localhost:7001

     -username system –password weblogic -listtask

To cancel a deployment task:

java weblogic.Deployer -adminurl http://localhost:7001

     -username system –password weblogic -cancel -id tag

转载请注明:WebLogic Android 博客 » WebLogic Edoc中关于weblogic.Deployer的一点小问题