dev@glassfish.java.net

Re: strange interaction that surprised me

From: Jane Young <jane.young_at_oracle.com>
Date: Fri, 18 Feb 2011 16:53:16 -0800

This behavior is expected.
Hong fixed this bug: http://java.net/jira/browse/GLASSFISH-4612


On 2/18/11 4:36 PM, Vince Kraemer wrote:
> I ran into this while doing some testing of a fix for the NB plugin...
>
> I am using GlassFish Server 3.1 promoted build 43...
>
> Consider that you have a web app packaged in bar.war. It does not
> contain a glassfish-web.xml file OR a sun-web.xml.
>
> If you `asadmin deploy --force=true bar.war`, the app gets deployed
> and the context root is something like http://localhost:8080/bar.
>
> If you `asadmin deploy --force=true --contextroot="foo" bar.war`, the
> app gets deployed and the context root is something like
> http://localhost:8080/foo.
>
> If you do `asadmin deploy --force=true --contextroot="foo" bar.war`
> and then do `asadmin deploy --force=true bar.war`, what do you think
> the URL to your web app will be?
>
> It ends up being http://localhost:8080/foo.... Which makes some
> sense... but is likely to be unexpected, too. It caught me by surprise.
>
> vbk