I can\'t get the primeFaces
InputStream stream = this.getClass().getResourceAsStream("sessionlog.csv");
The way as you have located the CSV file expects it to be in the same package as the current class, the FileDownloadBean.
If it is actually located in the package root, then you should rather be using:
InputStream stream = this.getClass().getResourceAsStream("/sessionlog.csv");
Or if it is actually located in a different package, for example com.example, then you should rather be using:
InputStream stream = this.getClass().getResourceAsStream("/com/example/sessionlog.csv");
Or if it is actually located in the root of the public webcontent (there where the /WEB-INF folder also is, among all other web files), then you should rather be using:
InputStream stream = externalContext.getResourceAsStream("/sessionlog.csv");
(which by the way also works fine for the WAR classes instead of this.getClass())