Send file to a path

M

Meendar

Hi,

I am using jasper reports for reporting and i am sending the file as
attachment to the client, please see the below code for more detail,

I just need to save in a particular folder in client location, how can
it be possible.

response.setContentType("application/pdf");
response.addHeader("Content-Disposition","attachment;
filename=StaffRemReport" +".pdf");
exporter = new JRPdfExporter();
exporter.setParameter(JRPdfExporterParameter.JASPER_PRINT,jasperPrint);
exporter.setParameter(JRPdfExporterParameter.OUTPUT_STREAM,response.getOutputStream()


Thanks in Advance;
 
A

Andrew Thompson

Meendar wrote:
...
I am using jasper reports for reporting and i am sending the file as
attachment to the client, ...

I just need to save in a particular folder in client location, how can
it be possible.

Is that a question? Note the addition of '?' marks
my words as a question.

It is not practical if you are sending the file as an
attachment, the user gets to choose where, and
even if, they will download it.

For more control on the client side, you might allow
access to the documents via a trusted applet or web
start application, and use that to save the PDF to a
specific location.

Why do you feel the need to force the user to save a
PDF in a particular place?

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200705/1
 
L

Lew

Andrew said:
Meendar wrote:
..

Is that a question? Note the addition of '?' marks
my words as a question.

It is not practical if you are sending the file as an
attachment, the user gets to choose where, and
even if, they will download it.

For more control on the client side, you might allow
access to the documents via a trusted applet or web
start application, and use that to save the PDF to a
specific location.

Why do you feel the need to force the user to save a
PDF in a particular place?

For that matter, what assurance do you have that the target directory even
exists on a user system? Or can exist?
 
M

Meendar

For that matter, what assurance do you have that the target directory even
exists on a user system? Or can exist?

Since file is the report , it is the customer's requirements to make
it a specific folder and save all the reports to the folder.

However, thanks to all for the useful suggestions!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top