my dog learned polymorphism*
The moose likes JSP and the fly likes File Download JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "File Download JSP" Watch "File Download JSP" New topic
Author

File Download JSP

Jehan Jaleel
Ranch Hand

Joined: Apr 30, 2002
Posts: 196
Hi,

I would like to implement a simple JSP page that just has links to files (PDFs) which users can download securely (meaning the transfer has to be secure, https?).

Can anyone please give some suggestions on how I can begin?

Thanks.
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

Yes, HTTPS is secure.
A quick google serach lead me to this example. perhaps it may be helpful. The certificate setup depends on the type of the server used. This example uses tomcat.


Thanks,
Tushar (SCJP 1.5)
Jehan Jaleel
Ranch Hand

Joined: Apr 30, 2002
Posts: 196
Thanks for this.

But in terms of the JSP itself and how it might look like, specifically the links to the secure files.

Thanks again.
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

Hi Jehan,

There are two aspects to look at here - Security and the Web Application.
But in terms of the JSP itself and how it might look like, specifically the links to the secure files.

Web Application - Your JSP remains the same just like you do for HTTP (e.g <href> to point to pdf). The only difference is that now the links contains https (https://www.example.com) instead of http (http://www.example.com) So, what makes this file transfer secure ?

Security - There are many ways to secure the file transfer between the client and server. Your use case suggests that the file transfer is for public user over internet. In this case HTTPS may be used. The SSl certificates on your web application server ensures that the communication between the client - user and the server is secure.

You might have a quick look at these links to get a feel of https and ssl.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: File Download JSP