0

我目前正在配置我们的开发环境以从开源 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 以上更改时),部署命令应变为:

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

干杯,克雷格

ps 目前正试图关闭 v3.1.2.2 来测试它,但公司防火墙是残酷的

4

1 回答 1

1

I think both --contextroot and --name are corresponding to when you use the admin panel from the browser. They are independent to each other. Use --contextroot only if you want to change the default contextroot to a different one.

于 2013-10-22T14:59:24.187 回答