users@glassfish.java.net

Re: How to deploy a war file inside a ear file as a root project of glassfish?

From: Antonio Goncalves <antonio.mailing_at_gmail.com>
Date: Fri, 28 Sep 2007 21:15:30 +0200

Ok. But after looking at the admin console I thought the syntax was the one
used in the combobox : earFile#warFile (project#mywebapp.war)

Well, I'll use the admin console then (I don't want to use an
application.xml descriptor)

Thanks,
Antonio


2007/9/28, Hong Zhang <Hong.Zhang_at_sun.com>:
>
> 2) is expected behavior. We don't have a way to pass in the context root
> for ear (containing web modules) using admin cli today. One reason is an
> ear could contain multiple web modules, and it would make the command
> line syntax quite complicated to do that.
>
> Antonio Goncalves wrote:
> > Hi,
> >
> > I have a /project.ear/ file which contains a /mywebapp.war/ file and I
> > would like to set it up as a root project. I've read the How to deploy
> > a war file as a root project of glassfish?
> > <http://forums.java.net/jive/thread.jspa?messageID=233259> thread
> > which explains two ways of doing it :
> >
> > 1) Through the Admin console => *works fine* when I select
> > project#mywebapp.war
> >
> > - go to Configuration -> HTTP Listeners -> http-listener-1
> > look at the Default Virtual Server, by default it is set to 'server'.
> > - go to Configuration -> Virtual Servers -> <server>
> > There is a dropdown box with the label :Default Web Module. Select
> > *project#mywebapp.war* as the default one.
> >
> > 2) Through the asadmin deploy command => *doesn't work*
> >
> > I've used asadmin deploy --contextroot "/" <your-webapp> (with
> > project.ear, project#mywebapp.war, mywebapp.war) but it doesn't work.
> > In the deploy command help it says "--contextroot Valid only if
> > the archive is a web module. It is ignored for other archive types;
> > defaults to filename without". So it looks like it doesn't work for
> > .ear file.
> >
> > Is there a way to do it with a asadmin command ?
> >
> > Thanks,
> > Antonio
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>