Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

serving pdf files

 
Matthew Phillips
Ranch Hand
Posts: 2676
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an ftp server with several pdf files. I would like to create a servlet that will forward requests directly to these files. I am running Tomcat on a different server from the ftp server. Is this possible?
 
Dale DeMott
Ranch Hand
Posts: 515
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm.. well what I did with PDF is stream my files to the user. I let the servlet control if the user had access to the file or not. You can forward them to the PDF files, however that would leave the directory open. If you control the streaming through the servlet, then you have a security controled by the servlet.
Something to think about.
-Dale
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to move this to the Tomcat forum because I like your idea and I am about to get Tomcat specific.
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to hijack my own thread slightly. Is it possible to access files that are stored outside of CATALINA_HOME?
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go ahead and delete this post. I was brain dead yesterday and didn't think before I posted.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't mind leaving evidence of brain-deadness around. I do it all the time in my code, so I don't see that you should get the magic treatment.

kidding!
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It certainly won't be the first evidence of me having a brain dead moment. Some would say that everyday is new evidence.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic