【问题标题】:GlassFish ASADMIN Deployment Command Specify context root with --name?GlassFish ASADMIN 部署命令 使用 --name 指定上下文根?
【发布时间】:2012-09-17 15:25:49
【问题描述】:

我目前正在配置我们的开发环境以从开源 glassfish v3.1 升级到开源 glassfish 3.1.2,并注意到使用 asadmin 命令的版本之间的这种差异:

v3.1

部署 --name test:beta-1.0 "c:\tmp\my-long-test-app-war-name.war"

这可以通过 http:\\localhost:8080\test 访问

v3.1.2

部署 --name test:beta-1.0 "c:\tmp\my-long-test-app-war-name.war"

这只能通过 http:\\localhost:8080\my-long-test-app-war-name 访问

我注意到新版本中的 --contextroot 被描述为:

 --contextroot
      Valid only if the  archive  is  a  web  module.  It  is
      ignored  for  other archive types; defaults to filename
      without extension.

而 --name 为:

 --name
      Name of the deployable component.

      The name can include an  optional  version  identifier,
      which  follows  the name and is separated from the name
      by a colon (:). The version identifier must begin  with
      a letter or number. It can contain alphanumeric charac-
      ters plus underscore (_),  dash  (-),  and  period  (.)
      characters.  For  more  information  about  module  and
      application versions, see "Module and Application  Ver-
      sions"  in  Oracle GlassFish Server Application Deploy-
      ment Guide.

因此,对于较新的版本(或在 3.1 以上更改时),部署命令应变为:

deploy --name test:beta-1.0 --contextroot test "c:\tmp\my-long-test-app-war-name.war"

干杯, 克雷格

ps 目前正在尝试关闭 v3.1.2.2 以进行测试,但公司防火墙很残酷

【问题讨论】:

    标签: glassfish asadmin


    【解决方案1】:

    我认为 --contextroot 和 --name 都对应于您在浏览器中使用管理面板时的情况。它们彼此独立。仅当您想将默认上下文根更改为不同的上下文根时,才使用 --contextroot。

    【讨论】:

      猜你喜欢
      • 2018-10-08
      • 1970-01-01
      • 2014-12-31
      • 1970-01-01
      • 1970-01-01
      • 2014-02-03
      • 2011-12-14
      • 1970-01-01
      • 2013-07-30
      相关资源
      最近更新 更多