Red Hat Bugzilla – Bug 109281
No mechanism to let projects provide a custom web.xml for the ROOT webapp.
Last modified: 2007-04-18 12:59:12 EDT
Description of problem:
See following mail thread:
From: Justin Ross <firstname.lastname@example.org>
To: Dennis Gregorovic <email@example.com>
cc: "Daniel P. Berrange" <firstname.lastname@example.org>, Justin Ross
"Rafael H. Schloming" <email@example.com>, Scott Seago
Randy Graebner <firstname.lastname@example.org>, Brian Stein <email@example.com>
Subject: Re: web.xml for ROOT webapp
This sounds good to me.
On Fri, 17 Oct 2003, Dennis Gregorovic wrote:
> I'm cool with this. Justin, Rafi: any objections?
> -- Dennis
> On Fri, 2003-10-17 at 14:41, Daniel P. Berrange wrote:
> > Since we are not going to have each application running in its own
> > webapp for the Oct 31st deliverable, we need to have a way to add
> > app-specific elements to the web.xml for the ROOT webapp. Prior to
> > test-packaging, we had the servlet-mappings.xml &
> > interpolation, but this was really hairy & troublesome code which
> > we don't really want to bring back. In addition, the contents of the
> > web.xml for the ROOT webapp should really be under the control of
> > the project developer, (not the application developers) since it
> > dictates site-wide policy to a large extent.
> > Thus I'd like to suggest a simpler alternative:
> > * Rename core/web/WEB-INF/web.xml to web.xml-default
> > * Projects can add alternate web.xml in (for example)
> > aplaws/web/WEB-INF/web.xml-aplaws
> > * Application can provide *example* fragments, but this
> > are not added in unless the project developer explicitly
> > copies them. This would be cms/web/WEB-INF/web.xml.example.cms
> > * Extend the project.xml thus:
> > <ccm:project
> > name="aplaws"
> > shortName="aplaws"
> > version="1.9.2"
> > release="1"
> > webxml="aplaws/web/WEB-INF/web.xml-aplaws"
> > xmlns:ccm="http://ccm.redhat.com/ccm-project">
> > * Modify the build-template.xsl to look for this attribute.
> > => If found, then after doing a 'deploy-config' it can
> > copy 'web.xml-aplaws' to 'web.xml'.
> > => If not found, then copy web.xml-default to web.xml
> > (preserving backwards compat for
> > * A similar config option for production
> > NB, even when we do move all apps to their own webapps we will still
> > need the support for overriding the web.xml for the ROOT webapp to
> > add additional mappings at the root URL space. For example APLAWS
> > would use:
> > * A URL shortcuts filter
> > * Site-wide prefix, eg /text
> > * Custom error JSP pages
> > * etc,
> > Dan.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
addressed on the devel side @38221 and on the depliy side @38244
We still need to rename 'core/web/WEB-INF/web.xml' to
'core/web/WEB-INF/web.xml-default' otherwise the build tools will
never copy across custom one.
12:22:03 dgregor@galileo foo4$ p4 describe -s 38379
Change 38379 by dennis@galileo-dennis on 2003/12/01 12:22:01
ccm hostinit will now copy $CCM_HOME/webapps/ROOT/web.xml-default to
web.xml if CCM_WEBXML is not
set and $CCM_HOME/webapps/ROOT/web.xml-default exists. part of
Affected files ...
... //tools/ccmbuild/tools/dev/commands/hostinit#9 edit