Hi,

I would like to propose two modifications:

[1] XML Validation
----------------------------
I would like to make two changes to the way xml validation is implemented:

(1) make the attribute available at the context level (turned off by default)
(2) add supports for turning on/off web.xml validation and tld validation separately.



The host implementation will stay the same (the current one). This way it will be possible to turn on/off validation of TLDs without impacting performance (e.g.web.xml)


[2] Overridable list of javax packages in WebappClassloader.
--------------------------------------------------------------------------------
Right now, the WebappClassloader.packageTriggers contains "javax". I guess this restriction comes from the J2EE specs, except that we should allow users to override packages that start with javax but are *not* included in J2EE (ex: JSF, JSTL). I would like to add a mechanism that contains a list of overridable packages:


/**
* Adds the given package name to the list of packages that may always be
* overriden, regardless of whether they belong to a protected namespace
*/
public void addOverridablePackage(String packageName){
if (overridablePackages == null){
overridablePackages = new ArrayList();
}
overridablePackages.add(packageName);
}

and add in WebappClassloader.filter(...)


        if (overridablePackages != null){
            for (int i = 0; i < overridablePackages.size(); i++) {
                if (packageName.
                        startsWith((String)overridablePackages.get(i)))
                    return false;
            }
        }



and then either add an attribute in context.xml (or globally in server.xml...I have no prefs). As an example, putting JSTL 1.0 under common/lib and bundling JSTL 1.1 in WEB-INF/lib will possibly cause problems, because the API starts with javax.servlet.jsp.jstl.*, and the 1.0 api will get loaded instead of 1.1 (I know , API are not supposed to changes, but the reality is different :-) )


Comments?

Thanks,

-- Jeanfrancois



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to