users@glassfish.java.net

Re: webapp context-params

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 04 May 2007 10:39:47 -0700

glassfish_at_javadesktop.org wrote On 05/04/07 06:07,:

>Ok, thanks, this is clear.
>The question is a bit different now - is there a way to set context-params with identical names separately for different webapps, outside of their's web.xml files, i.e in glassfish settings?
>
>

GlassFish supports configuring the same webapp differently depending
on the target virtual servers onto which the webapp gets deployed, by
associating a context.xml file with each of the target virtual servers.

In each context.xml, you may specify different values for context init
params of the same name.

The synatax of the context.xml file is the same as in Tomcat, see:

  http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

You specify the location of a virtual-server's context.xml resource as
the value of the virtual-server's "contextXmlDefault" property in
domain.xml.


Jan