dev@glassfish.java.net

Re: --contextroot

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Thu, 05 Mar 2009 21:39:24 -0500

Hi, Arun
    I tried to deploy a simple web application with --contextroot option
and it worked as expected for me.

hzhang_at_nmr:~/files/sun/glassfish/bin$ ./asadmin deploy --contextroot foo
~/deployment/apps/hello1.war
Command deploy executed successfully.

I was able to access the application under localhost:8080/foo

hzhang_at_nmr:~/files/sun/glassfish/bin$ ./asadmin deploy --force=true
--contextroot bar ~/deployment/apps/hello1.war
Command deploy executed successfully.

I was able to access the application under localhost:8080/bar.

    You can send me your application for me to try..

- Hong


Arun Gupta wrote:

> Two questions on --contextroot ...
>
> 1). On a fresh b39, I tried:
>
> -- cut here --
> >~/tools/glassfish/v3/b39/glassfishv3/bin/asadmin deploy --contextroot
> runlog --force=true runner
>
> Command deploy executed successfully.
> -- cut here --
>
> Here http://localhost:8080/runlog gives 404 and
> http://localhost:8080/runner shows the expected page.
>
> Is --contextroot switch expected to work ?
>
> 2). On another fresh instance I tried:
>
> -- cut here --
> >~/tools/glassfish/v3/b39/glassfishv3/bin/asadmin deploy runner
> Command deploy executed successfully.
>
> >~/tools/glassfish/v3/b39/glassfishv3/bin/asadmin deploy --contextroot
> runlog --force=true runner
>
> Command deploy executed successfully.
> -- cut here --
>
> But accessing http://localhost:8080/runner and
> http://localhost:8080/runlog both give 404.
>
> Why so ?
>
> -Arun