to find the workspace path at runtime to write the file
this is my first post in this forum..
I have a Struts project deployed in tomcat webapps. User Sign in details are configured in a xml file and are validated by reading the xml file..The xml file is in the path WEB-INF/classes/com/files/user.xml...
when a new user has to be added his/her details has to be written in the same user.xml file..I read the the file using
To write the file using filewriter if I have to give the full path without hardcoding it.
when I tried to get this path URL using getClass().getClassLoader().getResource("com/files/user.xml") , i get
Please suggest me how to solve this issue or is there way to find the workspace path at runtime so that I can avoid hardcoding of this path.
Thanks in advance