You can only have one response per request....

But your first action should first go to a landing page. The landing page
then either contains a link for the user to click to download the document,
or uses a JSP redirect there to get the PDF.

Paul

On Dec 11, 2007 9:01 AM, Jeff Amiel <[EMAIL PROTECTED]> wrote:

> I'm beating myself against a wall here .  Struts 1.X project (but
> shouldn't matter if was 2.X either).
> I have a JSP page with form containing checkboxes where a user selects
> which items he wants to 'print'.
> Submission of form to action which generates the PDF...and places it
> in the response (setting content type to application/pdf) and the
> action itself returns null.
>
> Works great (in that the PDF is generated and returned (and the local
> OS launches acrobat to view it).  Problem is that the JSP is still
> displayed with the checkboxes checked.....(those items are actually no
> longer available for printing).
>
> I have found no way to return the PDF content AND forward to a
> different action/page.....
> I can't 'embed' the pdf on a page that I can forward to as the PDF is
> generated dynamically.....
> I've played around with some javascript to 'hide' the elements when
> the 'submit' button is hit, but it really sucks.
>
>
> Any other suggestions?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to