File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes File Upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "File Upload" Watch "File Upload" New topic

File Upload

roul ravashimka
Ranch Hand

Joined: Mar 16, 2004
Posts: 53
Hello JavaRanchers,
i've got a problem when i download gifs,docs,..
it works well for pdf,zip,txt,mp3,html
but not for gifs,jpegs,avis,docs.
my code is:
<%@ page language="java" %>
response.setHeader("Content-Disposition","attachment; filename=\""+ request.getAttribute("filename") + "\""); fileInputStream = new"c:\\uploads\\"+(String)request.getAttribute("fileid"));
int i;
while((!= -1){
Is ther a difference between a pdf(which works) and a gif(which doesnt worok)?
Or do i have to use other streams?

MSc Electronics, ICT
Sergiu Truta
Ranch Hand

Joined: Dec 16, 2003
Posts: 121
I'm not really sure you posted this on the right forum. You should try the JSP forum instead.
Good luck. I'm walking the path...
I agree. Here's the link:
subject: File Upload
jQuery in Action, 3rd edition