I need to store profile pic of users on my application on the server side. I am storing that in the fileSystem through JSF(with Primefaces). However the documents are currently being stored in the tmp folder but get deleted after each restart of the server .
How should I store the documents which need to be kept permanently ?
I have been supplying the directory path through web.xml like follows: Do I just need to change the path to permanent location on the server?
(I am using the Primefaces uploadFile component to facilitate this uploading)
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>
org.primefaces.webapp.filter.FileUploadFilter
</filter-class>
<init-param>
<param-name>thresholdSize</param-name>
<param-value>51200</param-value>
</init-param>
<init-param>
<param-name>uploadDirectory</param-name>
<param-value>/tmp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>