Hi Guys,

I have a problem, my application should give a template of some format.
Which is going to be a CSV file.
So I am using
response.setContentType("application/csv");
response.setHeader("Content-Disposition","attachment;
filename=UPLOAD.csv;");

When I tried this the download was very fine with the download filename as
upload.csv.

But the same file when I put it in frames it downloads the html content of
the main file which is in the address bar.

Meaning say if my download file's name is download.jsp and I am calling it
directly it downloads the upload.csv file.

When I put the same file in frames say main.jsp contains header.jsp and
datascreen.jsp, onclick of a button in the datascreen.jsp I will call my
filedownload.jsp file.

When I click the button it downloads html content of the main.jsp instead of
the upload.csv on the fly.

I tried, on click of the button I called the file in open in new window but
it downloads upload.csv correct but the window stays back, I should close
that window once the download is over. Then I gave win.close() in the next
line, but it closed the window before the request was processed.

Then I gave the size of the window to move it from the visibility of the
user but no use it throws some exception .

Now my requirement is this, can any one tell me how do I close the window
once my download is over.

Hope my explanation is clear, if you need some more details please point
back your fingers to me.

Waiting .......................

Thanx in Advance
Yogaraj


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system."

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to