I have a tomcat app that needs to write to a file in a particular directory that is different depending on where the application is deployed (windows host v linux host, etc..).
The class object that needs to know the file location is an Exception class and I don't want to have to pass the ServletContext object from the JSP all the way down to this compiled Java class object.
I'd like to be able to just have the file location specified as a parameter string in the applications context.xml file and then just comment or un-comment the correct one depending on where I'm deploying this app, but I can't seem to figure out how I can access a string parameter object from within my compiled Java class in the Tomcat webapp. I'm hoping it is something similar to how I access data source objects from the InitialContext object, but have had no luck so far getting a String object out of that...
Your help is appreciated!