You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Allen,Eva" <al...@oclc.org> on 2006/10/26 01:33:47 UTC

[commons-digester] still can't get xmlrules to work in tomcat

I'm still having problems with getting xmlrules to work within a Tomcat
servlet container.  I pretty much snagged the code I use from the
xmlrules example that comes with the digester source.  The problem comes
with the getSystemResource call.  I keep getting a null URL.  I finally
named the rules file x.xml and placed it in every directory under
$TOMCAT_HOME and used the following code:
            
URL rulesURL = ClassLoader.getSystemResource("x.xml");

but still the returned URL is null.  This works fine as long as I'm not
running within the Tomcat servlet container.  It also works fine if I do
this instead

            URL rulesURL = null;
            File f = new File("x.xml");
            try {
                rulesURL = f.toURL();
            } catch (MalformedURLException e1) {
                e1.printStackTrace();
            }

but I'd much prefer to do it the "right" way if I could.  Any hints?

--
Eva Allen
Consulting Software Engineer, OCLC, Inc.
6565 Frantz Rd., Dublin, OH  43017
614.764.6009 | allene@oclc.org
Views contained herein are my own; they do not necessarily reflect those
of my employer


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