[prev in list] [next in list] [prev in thread] [next in thread]
List: tapestry-user
Subject: Re: AW: Showing a PDF Report
From: phillip rhodes <rhodepc () yahoo ! com>
Date: 2005-04-27 22:50:33
Message-ID: 20050427225033.67793.qmail () web51703 ! mail ! yahoo ! com
[Download RAW message or body]
I am writing a XML editor/transformation/fo to pdf
tool that uses tapestry.
In the code, you will find an example of outputting a
pdfstream to the browser.
www.xmlforge.org
--- Saqib Rasul <saqib.rasul@sagadc.de> wrote:
> This approach seems to throw exceptions that end up
> in the logs and look scary...
>
> Here is something that worked for me (for xml files)
> and doesn't throw exceptions...
>
> The other way is to create a normal tapestry page.
> In the .java file have something like this...
>
> public IMarkupWriter
> getResponseWriter(OutputStream arg0)
> {
>
> return new HTMLWriter("text/xml", arg0);
> }
>
> public void renderPage(IMarkupWriter writer,
> IRequestCycle cycle) {
>
> HttpServletResponse response =
>
> cycle.getRequestContext().getResponse();
> response.setContentType("text/xml");
>
> // generate your XML here...
> String mySringWithXML = ....
>
> writer.printRaw(myStringWithXML);
>
> }
>
> Regards,
>
> Saqib
>
> > -----Ursprüngliche Nachricht-----
> > Von: Pablo Ruggia [mailto:pruggia@gmail.com]
> > Gesendet: Wednesday, 27 April 2005 2:33 PM
> > An: Tapestry users
> > Betreff: Re: Showing a PDF Report
> >
> > Thanks Andreas !!!
> >
> > I wasm't closing the Response !!
> >
> > On 4/27/05, Andreas Andreou <andyhot@di.uoa.gr>
> wrote:
> > > Quoting Anatoli Krassavine
> > >
> > > "Sorry for chipping in late, but I am surprised
> that
> > > no one mentioned the simplest and cheapest
> approach:
> > > manually get hold of HttpResponse output stream
> and
> > > write to it and then close it. Tapestry will not
> > > attempt to re-open the stream."
> > >
> > > For even more details, check the archives for
> > > "Suppressing page response"
> > >
> > >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> >
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic