I’m just testing out saving to a file from a servlet, and I want this to work regarding of where I host this application.
There is no security issue with the file being viewable from the web at this time.
Is there a way I can figure out the current running folder of the application, or could I store this information in my web.xml and retrieve it and store it in a static variable and then reference it in my applications servlet class?
I don’t want to perform a lookup in a config file each time the web page renders, speed is very import for this silly little test I’m playing around with.
That said, you wouldn’t look up a proper value in a file each time, you’d either specify it as an init-param, or load it in at startup and store it in the application context.