How to save generated file temporarily in servlet based web application
Never use relative local disk file system paths in a Java EE web application such as new File(“filename.xml”). For an in depth explanation, see also getResourceAsStream() vs FileInputStream. Never use getRealPath() with the purpose to obtain a location to write files. For an in depth explanation, see also What does servletcontext.getRealPath(“/”) mean and when should … Read more