I have written a java program in which I am creating a file.
BufferedWriter writer =
new BufferedWriter(
new OutputStreamWriter(
new FileOutputStream("myfile.txt"))
It is creating the file in the current folder (my project folder). Till here everything is perfect. Now I have designed a servlet and call this class. The file is now getting created in the tomcat bin folder. Do I need to make any changes to classpath
or server.xml
or context.xml
in tomcat?