I have done it for the database.xml file by using ClassLoader.getSystemResource( "..." ).toString(). However, I think that access to this may be limited by the policy files defined by the particular J2EE server you may be using...
I have not tried it specifically with the mapping files. Basically I put the database.xml file into a directory (say WEB-INF/classes/properties, for example), then do: ClassLoader myCL = getClass().getClassLoader(); String dbURL = myCL.getSystemResource( "properties/database.xml" ).toString(); jdo.loadConfiguration( dbURL ); ******************************************** Steve Ebersole IT Integration Engineer Vignette Corporation 512.741.4195 Visit http://www.vignette.com ******************************************** -----Original Message----- From: paul brockmeyer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 10:36 AM To: [EMAIL PROTECTED] Subject: [castor-dev] mapping.loadMapping(String URL) ... local file? i want to keep my maps in a more private location (like my WEB-INF directory) as opposed to making it publicly accessible. i've tried things like: mapping.loadMapping(file://www/mysite/WEB-INF/myMap.xml); mapping.loadMapping(/www/mysite/WEB-INF/myMap.xml); but it can't find it ... so far the only thing that i've gotten to work is moving the map out of WEB-INF and using a publicly accessible URL like: mapping.loadMapping(http://www.mysite.com/myMap.xml); has anyone loaded their maps from a non-public location? thanks. -paul ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
