File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes file download Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "file download" Watch "file download" New topic

file download

Indrayani Bhoir

Joined: Dec 02, 2002
Posts: 21
Hi ,
i want to know that is there any way to provide file download option using jsp .
currently i am using follwing code for file download option but as this don't allow any java
script to be used in same page. i am facing some problem.
// fetch the file
String filename = "companySecret.txt";
String filepath = "C:\\";
"attachment; filename=\""
+ filename + "\""); fileInputStream =
+ filename);
int i;
while (( != -1) {
I agree. Here's the link:
subject: file download
It's not a secret anymore!