commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (VALIDATOR-195) Lodaing of Digester Rules for classes extending ValidatorResources does not work
Date Wed, 19 Jul 2006 13:22:34 GMT
     [ http://issues.apache.org/jira/browse/VALIDATOR-195?page=all ]

Niall Pemberton updated VALIDATOR-195:
--------------------------------------

    Component/s: Framework

> Lodaing of Digester Rules for classes extending  ValidatorResources does not work
> ---------------------------------------------------------------------------------
>
>                 Key: VALIDATOR-195
>                 URL: http://issues.apache.org/jira/browse/VALIDATOR-195
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.3.0 Release, 1.2.0 Release
>         Environment: Windows/Unix
>            Reporter: Vijay Pandey
>
> If we extend the class "ValidatorResources", then the loading of the digester rules does
not work properly.
> ---------------------------------ValidatorResources---------------------------------------------------------
>     private Digester initDigester() {
>         URL rulesUrl = this.getClass().getResource("digester-rules.xml");
> -----------------------------------------------------------------------------------------------------------------------
> The above line tries to find the "digester-rules.xml" from the path of extending class
and hence to make this work we need to
> copy the digester rules xml file in the same pacakge as the extending class.
> I think a better way might be is to accept a InputStream or URL for the digester rules
in the constructor if someone wants to 
> have their custom digester rules, and by default if it's not provided it should always
take from the ValidatorResources path
> by changing the code 
> this.getClass().getResource("digester-rules.xml");
> to 
> ValidatorResources.class.getResource("digester-rules.xml");
> Thanks
> Vijay
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message