xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Galbraith <bgalbra...@amirsys.com>
Subject Re: XSL/PDF
Date Mon, 02 Jun 2003 22:15:06 GMT
Hmm...

Calling Response.setContentType(String) shouldn't cause the servlet 
container to re-execute a call to ActionServlet.doGet(...); have you 
determined why this is occuring?

Fortunately, you have options if you cannot find a solution.  Here are some:

(1) Create a servlet that generates the PDF.  Forward to the servlet in 
your Action class.

(2) Create the same servlet mentioned above and call it directly, 
bypassing Struts.

(3) Generate the PDF within the Action class, and instead of returning 
it as the contents of the HTTP Response, save the PDF to the file system 
and return an HTTP redirect to the PDF.

Let me know if you have questions on any of the above.

Ben

Glen Mazza wrote:
> In your Struts Action.ActionForward class, if you call
> "response.reset();" at the beginning it seemed to work
> for me (erases the first of the two calls IE made).
> 
> However, I suspect that would then render Mozilla and
> Netscape browsers inoperable because they don't make
> multiple calls.  Perhaps best to find out the browser
> the client is using first?  Main thing is make sure
> your changes don't affect users of other browsers that
> were programmed correctly.
> 
> Or, if possible, better to design the code such that
> even if it calls it multiple times everything will
> still work fine.  If IE is a sluggish browser because
> it insists on requesting & generating reports multiple
> times, then so be it--recommend to your users other
> browsers for better speed!
> 
> Other possibilities:
> http://xml.apache.org/fop/servlets.html#ie
> 
> Glen
> 
> --- Brett DiPerna <bdiperna@yahoo.com> wrote:
> 
>>Hi Glen,
>>I am having this same problem.  Did you ever find a
>>solution or workaround?
>>Any help would be greatly appreciated.
>>
>>Thanks,
>>Brett
>>
>>
>>
>>
>>
> 
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
>><<<<<<<<<<<<<<<
>>
>>Currently I'm returning PDF manually from my Struts
>>Action subclass,
>>without using stxx.
>>
>>Works fine, except that for some reason the doGet()
>>request for this
>>action ends up being called twice--apparently
>>because of the
>>setContentType("application/pdf") statement within
>>the Action
>>subclass code. (I'm using an MSIE client, and if I
>>don't use the
>>setContentType() statement, the problem doesn't
>>occur but I don't get
>>PDF back.) This results in the XML->PDF process
>>occuring twice to
>>generate the same response.
>>
>>Has anyone ever had this problem with stxx--that of
>>the browser
>>somehow automatically requesting the processing to
>>occur twice? If
>>no, I may need to switch to stxx to solve this
>>problem.
>>
>>Thanks,
>>Glen
>>
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Mime
View raw message