jsr369-experts@servlet-spec.java.net

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

From: Greg Wilkins <gregw_at_webtide.com>
Date: Thu, 27 Aug 2015 15:44:02 +1000

I agree that web.xml is not the best place for this, but then there are
lots of things that shouldn't really be in web.xml.

However, perhaps if instead of a specific configuration, if it were a
default that is clear that it can be overridden by other container
mechanism?

Something like:

 <default-context-path>/</default-context-path>

and it would be used IFF there was no other explicit configuration for the
context path in the container (including container specific configuration)
and there was no other context already deployed at that path.

cheers



On 26 August 2015 at 10:53, Shing Wai Chan <shing.wai.chan_at_oracle.com>
wrote:

> I am looking at https://java.net/jira/browse/SERVLET_SPEC-137
> (“Allow context root”)
>
> In Java EE ear application, one can configure the context-root in
> application.xml.
> For war, there is no such configuration in web.xml.
>
> Most servlet containers take default context-root = name of the
> applications.
> And there are different solutions to configure the context-root as follows:
> i) configure context-root through the proprietary descriptors.
> For instance glassfish-web.xml in GlassFish and weblogic.xml in
> WebLogic.
> ii) configure context-root at the time of deployment without editing
> descriptors in the war.
> iii) support the configuration of context-root “after” the deployment
> through administration tool.
>
> I am considering adding a context-root element in web.xml.
> Any comments?
>
> Shing Wai Chan
>



-- 
Greg Wilkins <gregw@webtide.com> CTO http://webtide.com