× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: David Morris
>
> I am not sure if there is any magic in .ini or .properties, but if you
> use a property file, you should be able to load it from your
> WEB-INF directory with the application class loader. For
> resources retrieved using a URL, the docBase will be where
> you start.

My concern here, David, is that the Tomcat standalone implementation works
differently than both the WebSphere and the Apache/Tomcat version.  I don't
like it when I don't understand something.  How the method
File.getCanonicalPath works is a bit of a mystery anyway, and I assume it
has something to do with how the JVM is initialized - what I want to know is
why the JVM is initialized differently for standalone Tomcat than for
WebSphere or Apache/Tomcat.  More importantly, I want to know how to change
that behavior in such a way that I have a consistent method of access for
these base files.  Since the configuration file is what I would use to
determine other behaviors, it is essential that I be able to have some
standard access.

You say to access te file using the application class loader.  I'm not sure
how to code that.  I like simple, and java.io.File is about as simple as
they come.  What you seem to be saying is that I can't count on consistent
behavior for java.io.File, and that I need to use the classloader.  Two
question arise from that:

1. How do I do it?  I've never used a classloader to load a text file.
2. Are you sure that the classloader will work consistently across the
various web application servers?

The fact that something as simple and basic as java.io.File doesn't work
consistently bothers me.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.