I am trying to create a CSV file dynamically in the user's system whoever uses my Application so that I can write data into it and then import it to an Excel.
Once I am done with my Application, I am deploying the WAR file in the Tomcat Server in the Server system. I am trying to use System.getProperty("user.home") for creating the file in a particular path. But the file is creating in the system where the App is deployed (Server system).
Different users will be using the App in different systems,so how can I get the path for creating a file in the Local Host System (user's system)?
Ulf Dittmer wrote:A web app can't access the client file system. You'll have to store the file somewhere on the server file system and provide a link to download it, or stream the CSV directly to the browser.
Thanks Dittmer. I hope, this will help me out. Actually, I want to write the data into CSV and then import the data into Excel Workbook. Can you explain me, how to stream CSV to browser?