cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Howard" <coc...@leverageweb.com>
Subject [NEW] webapp config with xconf tool
Date Fri, 23 May 2003 03:36:49 GMT
I've just committed some changes to the xconf tool and build
process that I think have the potential to solve several problems:
1) Some configuration can only be done (as things stand in 2.1)
in web.xml and this tends to be a confusing factor for some users.
2) Keeping configuration modifications in sync across upgrades is a
pain.

So,
- the build (currently only blocks build) now looks for .xweb files
and patches web.xml with them.
- xpatch now recognizes a new attribute: if-prop (open to a new name)
which only includes the patch if the named build property is true
(undeclared attributes interpreted as false).
- the database block and the hsql block have .xweb files that add the
driver class names to the load-class init-param in web.xml

To allow this I had to patch XConfToolTask in the following ways:
-  Stop xerces from retrieving DTD's by setting a xerces specific
   BuilderFactory attribute false. This would be ignored in non
   xerces parsers, but would only cause a UnknownHostException when
   the parser attempts to retrieve the DTD from a file being patched
   (from web.xml, for example).  If needed, other parser implementations
   (keep in mind this is only during build) may have similar mechanisms.
For the complications surrounding this issue see (if you don't already
know):
http://www.geocrawler.com/archives/3/196/2002/9/0/9571501/
http://xml.apache.org/xerces2-j/features.html#nonvalidating.load-external-dt
d
http://xml.apache.org/xerces2-j/features.html
http://marc.theaimsgroup.com/?t=105357989100002&r=1&w=2
http://marc.theaimsgroup.com/?t=105347757500001&r=1&w=2
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105348884411153&w=2

Also see
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105363003923785&w=2
regarding another option besides xpatch

- I also did:
            builderFactory.setValidating(false);
            builderFactory.setExpandEntityReferences(false);
            builderFactory.setNamespaceAware(false);
though only setValidating is necessary.  I can roll the other two settings
back, but wanted to get others opinion on what was needed.

>From here, I'd like add this xpatch task to non-blocks related configs
found in web.xml (by modifying the webapp build target and adding a
directory
somewhere to hold the files): file uploads, cocoon reload, and any others
that make sense.

Hoping this isn't breaking things,
Geoff


Mime
View raw message