File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Download using Servlet versus providing a link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Download using Servlet versus providing a link" Watch "Download using Servlet versus providing a link" New topic
Author

Download using Servlet versus providing a link

C Vivek
Ranch Hand

Joined: Oct 03, 2004
Posts: 115
Dear All,
If I have a pdf document to be made available to users for a small intranet site. Can I just provide a link of that file directly using html-Href or should I be making a servlet for the same.
Are there any advantage of using the servlet?

Thanks in advance.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

You can provide a normal http:// reference yes. An advantage of doing it through a servlet is security (you can block access to users that you don't want to see the PDF, you're also 'hiding' any directory structure that people may try to exploit etc).

Hope that helps!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Download using Servlet versus providing a link