0

i'm not very experienced with java ee and i've been assigned with the task to grab certain ammount of files (pdf) located inside a folder in the same server (Tomcat) the webapp (java ee with mvc and facelet) is deployed and show them in a page for the users to download or view them inside the browser. What's the approach here? Should i retrieve the file like with a streamReader and treat them like i'm accessing files from filesystem? Mind you that not all pdf are visible to all users. Each users will have it's folder and must be able to access files from that specific folder only. So i don't think that going with the Tomcat default servlet is the way to go but maybe i'm wrong Any idea/ suggestions?

Thanks in advance!

Miriam
  • 347
  • 1
  • 2
  • 19
  • What happened to the old fashioned hyperlink? Let the server and the browser handle the download, just show the user a link to the PDF. Don't even try to write code that displays it in the browser. There are applications to handle that. – SurfMan Jan 26 '18 at 09:26
  • Also, Tomcat still isn't a full blown J2EE server, [Tomcat application server](https://javapipe.com/hosting/blog/tomcat-application-server/) see the article for comparison/explanation - but tomcat may work for your needs. – JGlass Jan 26 '18 at 13:39

0 Answers0