You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Nekkalapudi, Viplava" <VN...@erac.com> on 2002/06/12 19:54:52 UTC

Issue with struts when generate reports from action class

    Generating a PDF report from struts action class using 'iText'
works fine.
    But We have a small issue related with Struts. 
When there is a validation error, The errors display on the input page.
So we enter required data, and click 'Generate PDF report', 
Opens up Acrobat reader with the report. 
In this case how can we clear the errors on the input page?
Right now, the error message still displays even after I open report.
(We don't want to open PDF in the same browser window, So we used 
content-disposition as 'attachment').
Is there any way to refresh the input page, once the response is submitted.

Thanks,  Vip.


-----Original Message-----
From: Vincent Aumont [mailto:vincent.aumont@vsl.ca]
Sent: Tuesday, April 30, 2002 7:45 PM
To: Struts Users Mailing List
Subject: Re: some PDF stuff




> >  response.setHeader("Content-disposition","attachment; filename=" +
> filename);
>
>  I don't have a file name for the pdf I generate (may be I can have one).

Any name will do. It's the name the browser uses should your user decide to
save
the document to disk.

>  The Action class returns a NULL Action Forward.

Same here.

-Vincent.


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Issue with struts when generate reports from action class

Posted by James Mitchell <jm...@telocity.com>.
return the successful page with a meta-refresh to the pdf

or use javascript

HTH

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

> -----Original Message-----
> From: Nekkalapudi, Viplava [mailto:VNekkalapudi@erac.com]
> Sent: Wednesday, June 12, 2002 1:55 PM
> To: 'Struts Users Mailing List'
> Subject: Issue with struts when generate reports from action class
>
>
>
>     Generating a PDF report from struts action class using 'iText'
> works fine.
>     But We have a small issue related with Struts.
> When there is a validation error, The errors display on the input page.
> So we enter required data, and click 'Generate PDF report',
> Opens up Acrobat reader with the report.
> In this case how can we clear the errors on the input page?
> Right now, the error message still displays even after I open report.
> (We don't want to open PDF in the same browser window, So we used
> content-disposition as 'attachment').
> Is there any way to refresh the input page, once the response is
> submitted.
>
> Thanks,  Vip.
>
>
> -----Original Message-----
> From: Vincent Aumont [mailto:vincent.aumont@vsl.ca]
> Sent: Tuesday, April 30, 2002 7:45 PM
> To: Struts Users Mailing List
> Subject: Re: some PDF stuff
>
>
>
>
> > >  response.setHeader("Content-disposition","attachment; filename=" +
> > filename);
> >
> >  I don't have a file name for the pdf I generate (may be I can
> have one).
>
> Any name will do. It's the name the browser uses should your user
> decide to
> save
> the document to disk.
>
> >  The Action class returns a NULL Action Forward.
>
> Same here.
>
> -Vincent.
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>