0

For a project I am creating an application where I need to download a file from another system -> parse information out of it -> sign the file -> compress it -> upload to database

For this I am developing a Java EE web application using JPA and JSF.

Is there a way to save the file to a specific directory? Right now I have hard coded the location where I store the file on my system. My goal is that it doesn't matter where I deploy the application it will dynamically use a file location for storing the file temporary so the application can process it.

M. Jacobs
  • 7
  • 5
  • While deploying in server, you have to create a same folder structure which you have created locally. then only it will work – Jay Jul 19 '18 at 09:18
  • JPA is nothing to do with saving a file. Perhaps remove that tag, since it is seemingly nothing to do with your "problem". Otherwise post JPA code –  Jul 19 '18 at 09:19
  • Removed the tag. I want the application to use a dynamically picked file location to store the files temporary so I can process them. Is this actually possible? All suggestions are welcome – M. Jacobs Jul 19 '18 at 09:29

1 Answers1

0

System property java.io.tmpdir has the string location of the system's temporary folder

Lev Kuznetsov
  • 3,520
  • 5
  • 20
  • 33