Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder brad211987's Avatar
    Join Date
    Sep 2005
    Location
    Ohio
    Posts
    631
    Thanks
    10
    Thanked 50 Times in 50 Posts

    Hosting a file for download

    I'm trying to find a way to let a user download a file, from a Java EE application, without using a direct link to the file. For example, if I have a pdf file thats located in a downloads directory of my application, the link might be:

    http://myapp.com/downloads/myfile.pdf

    We are trying to make it so that you will not be able to manually type the URL of a file into the address bar and get a file that you do not have access to. Does anyone have any ideas how this is usually done? Currently digging through books and crawling around the web, but haven't found anything useful as of yet.

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    write ur own servlet that checks for a token plus some identifier to locate the actual file
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    Regular Coder brad211987's Avatar
    Join Date
    Sep 2005
    Location
    Ohio
    Posts
    631
    Thanks
    10
    Thanked 50 Times in 50 Posts
    Wonderful timing, I was actually just starting to prototype that idea now. Thanks for the reply, I'll probably post results and an example if anyone is interested.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •