S
sasuke
Hello all.
Is it possible to get the path at which my application root is placed
by means of either the ServletContext or the ServletConfig object?
What I am trying to do here is to dynamically create a Javascript file
on the fly and put in the script directory of my web application. But
since the working directory in a web applications case is the
directory which contains the app servers' executable, any new file
created would be created there and I don't want to hard code the path
to my script folder. I want everything to be relative to the
applications' root as far as possible.
Can it be done without any special configuration, the way I can get a
resource present in the application root by the getResource() method?
Any kind of help would be greatly appreciated.
Regards,
sasuke.
Is it possible to get the path at which my application root is placed
by means of either the ServletContext or the ServletConfig object?
What I am trying to do here is to dynamically create a Javascript file
on the fly and put in the script directory of my web application. But
since the working directory in a web applications case is the
directory which contains the app servers' executable, any new file
created would be created there and I don't want to hard code the path
to my script folder. I want everything to be relative to the
applications' root as far as possible.
Can it be done without any special configuration, the way I can get a
resource present in the application root by the getResource() method?
Any kind of help would be greatly appreciated.
Regards,
sasuke.