I am using PrimeFaces v3.5 to download files on my computer using the Firefox browser. event.getFile().getFileName() returns the file name with the full path, which causes problems. Internally PrimeFaces uses shared Apache resources. I checked javadoc , but didn't help me anymore.
To overcome this problem, I slightly modified the program as follows -
String fileName = event.getFile().getFileName(); fileName = fileName.substring(fileName.lastIndexOf("\\"));
But it is not reliable and reliable. Any suggestions please?
windows jsf primefaces
Ravi joshi
source share