I know this is not topical to Axis, but since you asked...

Try this:

    private static final String SOME_FILE = "OrderRecord/Server/ebox.xml";

    private void loadFile()
        throws IOException
    {
        ClassLoader cl = ClassLoader.getSystemClassLoader();
        URL url = cl.getResource(SOME_FILE);
        if (url == null) {
            LOG.error("Could not find file: " + SOME_FILE);
        }
        InputStream rf = url.openStream();
        if (rf == null) {
            LOG.error("Error creating inputstream for file: " + SOME_FILE);
        }
        LOG.debug("Loaded file: " + SOME_FILE);
    }

On Mon, 2002-01-28 at 07:47, Dave Cramer wrote:
> Hi,
> 
> I am trying to load a file out of the classes directory of the web app. 
> 
> My code is as follows
> 
>         java.io.InputStream xmlStream =
> OrderRecord.class.getClassLoader().getResourceAsStream("Server/ebox.xml"
> );
> 
> OrderRecord is a class which is in the classes directory of the web app.
> 
> The file ebox.xml is in the 
> 
> webapps/WEB-INF/classes/OrderRecord/Server directory
> 
> It doesn't seem to load properly, can anyone tell me how to load this
> file?
> 
> This should work, as the classloader is able to get other classes out of
> the classes directory of the webapp
> 
> Dave
-- 
:/ byrne

[EMAIL PROTECTED]
(415) 544-7732

Reply via email to