I have 2 frames in my jsp and the second frame has a file which is on the server and in the top frame i have download the file . On clicking this i go to server and i will flush the stream to the response by setting some headers .
This is because the document is getting null after this .
can any one let me know what might be the problem .
Out of curiosity, why do you have an entire frame devoted to downloading a file? I understand if it's a file that could be displayed within the frame, like a pdf or a movie for example, but if it's something that needs to be downloaded why not just have a link?
And as always the relevant samples of your code are always helpful.
Joined: Sep 21, 2003
I have the bottom frame for showing the data in the file .if the user wants to download that
file (As its on the server ) we have this download option.
And coming to my top frame where there are few buttons
<a href="/export.do?id=test.html" class="two">Download</a> . When the user clicks download it goes to a servlet and sets the response headers as
But doing some research i got to know that there is some problem with the header 2 i am setting for the response .If i remove this everything works fine. but i cant remove that as the file name while saving will come as "export.do" for that file.
can any one tell me what might be the problem ?? r else is there any header substituting the header 2 so that i get appropriate file name
subject: Problem while downloading file from server