Working on some import process where i need to first upload the file at some location on server and than later on i need to pick the file from this location to import it in to the system. i am just wondering what might be the best place to store the uploaded file. i have few option
1) Can create a folder in the root of tomcat and than can place the upload files there and later on can pick the file for the import process.
File dir = new File(System.getProperty("catalina.base"), "uploads");
is this a good option and weather the above code will work equally in all enviornment
2) i can create an uploads folder undermy application and can access it for file upload and later on for import by using the following code
ServletActionContext.getServletContext().getRealPath("uploads");
your valuable suggestions are needed the only work i need to do is to upload the file and den run the import process for the uploaded files(s) and once import is successfull remove files from this folder to other like processed etc.