I have a web application that utilizes a context listener to instantiate an object that parses data from a raw text file and inserts it into a data structure. The reference to this data structure object is then stored in a context attribute.
The deployment problem that I am having is that when the context is initialized, my application cannot find the text file. Here's my code:
From the DD:
The listener class:
The actual file reader class:
I placed the rates directory directly under the application directory. Based on my code, is this where it should be or am I pointing to something else? Any tips would be appreciated. [ August 08, 2005: Message edited by: Jon Cone ]
I think you should use getResourceAsStream instead of your own method. Because this method uses ClassLoader to get stream, if your application is packaged as a war, this method will work very well while yours may not work