Where to store temporary files in a java web application? -
i'm developing java/spring-mvc web app using scheduling system generate csv files send via e mail.
my first idea generate these files locally in server , send them recipients, have doubt. store temp files?
i deploy application war, know there problems.
is bad idea create temporary directory in web-inf directory? alternative serialize these files , store them in database table.
what's suggestion? best practice?
i left on jvm, i.e. use java.io.tmpdir
system property. create directory in tmp dir (new file(system.getproperty("java.io.tmpdir")).mkdir()
) or file in tmp directory (file.createtempfile("name", ".csv")
).
application running on tomcat, tmp dir <catalina_home_directory>/temp
.
Comments
Post a Comment