users@glassfish.java.net

Re: Newbie question - is it possible to deploy 2 contexts using same war file

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 19 Feb 2010 19:26:16 -0800

On 02/19/10 05:35 AM, glassfish_at_javadesktop.org wrote:
> We are currently porting our application to Glassfish from Tomcat, but run into "small" problem. I can't find option to define more than one context file (with different context names) that can use same war file. It was nice feature on Tomcat since it allowed us to save memory. Is it possible to do it on Glassfish?
>
>
Are you referring to the use of Context fragments that are configured
with the same docBase, but differ in their path (and possibly other
configuration)? In essence, you're trying to deploy the same bits multiple
times, at different context roots?

The closest I could think in GlassFish would be to create one or more
symbolic links to a directory containing an exploded web application
("existing"), and then perform a directory deployment for each, as in:

  ln -s existing new1
  ln -s existing new2
  ...

followed by

  asadmin deploy existing
  asadmin deploy new1
  asadmin deploy new2


Jan


> Thanks in advance,
> S.
> [Message sent by forum member 'mudri' (stanislav.mudrinski_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=387586
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>