users@servlet-spec.java.net

[servlet-spec users] Re: [jsr369-experts] Re: Re: Re: Re: SERVLET_SPEC-137: Allow context root

From: Mark Thomas <markt_at_apache.org>
Date: Wed, 2 Sep 2015 14:54:06 +0100

On 02/09/2015 13:01, arjan tijms wrote:
> Hi.
>
> On Wed, Sep 2, 2015 at 12:24 PM, Mark Thomas <markt_at_apache.org> wrote:
>> I'm aware of application.xml for EAR files. Pointers to the docs for
>> other containers would be appreciated since I don't know them at all.
>
> Just a couple of quick ones that weren't mentioned yet:

Thanks. Useful background. A couple of things popped out at me.

- None of the docs speak to how conflicts are handled if two WARs
  specify the same path. If this feature is added to web.xml then the
  specification needs to address this so the behaviour is consistent
  across containers.

- Most seem to use it as a default (that takes precedence over the file
  name) that can be overridden elsewhere in the deployment process

- The Jetty docs mention one of the pitfalls of this approach is that
  changing it requires modifying the WAR although in the Jetty case that
  looks to be because the value, if present, has precedence over other
  options.

I can see the attraction of taking a configuration option that most
containers provide in some container specific way and providing a common
configuration option for it in web.xml.

However, I remain unconvinced that this feature is a good idea.

Thanks again for the really useful links.

Mark


> WebLogic WEB-INF/weblogic.xml "context-root" ->
> http://docs.oracle.com/cd/E24329_01/web.1211/e21049/weblogic_xml.htm#WBAPP623
> Geronimo WEB-INF/geronimo-web.xml "context-root" ->
> http://geronimo.apache.org/GMOxDOC30/geronimo-webxml.html
> Liberty WEB-INF/ibm-web-ext.xml "context-root" ->
> http://stackoverflow.com/questions/8484842/define-contextroot-inside-war-file
> JEUS WEB-INF/jeus-web-dd.xml "context-path" ->
> http://www.tmax.co.kr/img/service/pdf/manual/JEUS_6_deployment.pdf and
> https://github.com/OpenSourceConsulting/athena-chameleon/blob/master/src/test/resources/parser/jeus-web-dd.xml
> WebOTX WEB-INF/nec-web.xml "context-root" ->
> http://www.nec.co.jp/WebOTX/download/manual/71/caution/webcnt/index.html
> Jetty WEB-INF/jetty-web.xml "contextPath" ->
> http://www.eclipse.org/jetty/documentation/current/configuring-contexts.html#setting-context-path
>
> Hope this helps
>
> Kind regards,
> Arjan Tijms
>