struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "El Harouchi, Jaafar [IT]" <>
Subject RESOLVED RE: Path Info for downloaded files
Date Thu, 19 Jun 2003 15:35:57 GMT
We resolved the download issue by first doing:
I would still be interested in how to set the Path Info.

-----Original Message-----
From: El Harouchi, Jaafar [IT] 
Sent: Thursday, June 19, 2003 1:01 AM
Subject: Path Info for downloaded files

I've been trying to get generated PDF and CSV files to be downloaed by my actions but can't
get it to work in IE using HTTP 1.0 when my app is behind the corporate portal.  It works
when accessed directly through the app (but not when I try to reach the action by putting
the full url).

I'm using all the tricks I could find:
      Setting ContentType:  response.setContentType("application/pdf");
      Setting the ContentDisposition: response.setHeader("Content-Disposition", "attachment;
      Adding  8192 bytes to be sure that IE shows the document: ostream.write(new byte[8192]);
      /Setting contentlength: response.setContentLength(data.length+8192);
      // Flush the buffer:  response.flushBuffer();

It works in Netscape 4.7, Netscape 6.
Since IE is the problem and our corporate standard i have to try setting the Path Info, instead
on relying on the content disposition.

So how would you set the path info if you have your actions mapped as follows:
and configured as follows:
       <action path="/dailyReports"
                <forward name="next"
These are dispatch actions anf the url is something like:
If I change it to GET from POST it would be:

Where would the path info go?
If I add it in between action/file.pdf/dailyReports the mapping fails and my action is not
If I add it at the very end &test/file.pdf I get the same stupid IE error after it prompts
you to open/save.

Any ideas would be greatly appreciate it.

Sorry if it is a little incoherent but we really understimated our effort and have had to
work looong hours.

thanks a lot

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message