cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [C2] Pipeing non-XML thrue Cocoon
Date Fri, 10 Aug 2001 20:11:19 GMT
On Fri, 10 Aug 2001, Drasko Kokic wrote:

> Thanks for the reply Giacomo
>
> I wish I could understand more what you are proposing
> ... would you by any chance have some code samples
> doing something similar?!

Ok, move the code you have to connect to your back-end system in your
XSP page into a class that implements the
org.apache.cocoon.acting.Action interface or extend one of the concrete
classes in that package were you also find a huge amount of concrete
Actions.

In the sitemap you have to put the <map:act to your Action at the right
place where your URI will be matched to grab the PDF.

> What do you mean by "Write a custom Reader class that retrieves that
> PDF and puts it down the stream." ?!

The org.apache.cocoon.reading.Reader interface is a combination of a
Generator and a Serializer. Look at the classes in there for samples.

Giacomo

>
> TIA
> Drasko
>
> --- giacomo <giacomo@apache.org> wrote:
> > On Fri, 10 Aug 2001, Drasko Kokic wrote:
> >
> > > Hi there,
> > >
> > > I wonder if anybody had come accross this problem
> > > before:
> > > In the XSP generator I need to contact a back-end
> > > system that (unfortunately) replies with PDF.  I
> > would
> > > like to know what would be a way to still use
> > Cocoon
> > > (because I have all other pages implemented thrue
> > > XML/XSL).
> > > Is there a way to insert the received PDF directly
> > > into some kind of cache and just reffere it
> > somehow?!
> >
> > Refactor your back-end system interaction into an
> > Action and store the
> > result into a request attribute (if you need it only
> > for one response)
> > or put it into a Session object or the Store
> > component (if you need it
> > for more than once). Write a custom Reader class
> > that retrieves that PDF
> > and puts it down the stream.
> >
> > Giacomo
> >
> > >
> > > I would be very thankfull for all/any responses
> > > This is very much endangering my idea of using the
> > > Cocoon technology in our portal business :-(
> > >
> > > Please, do not suggest that the PDF should be
> > replaced
> > > with some XML structure ... I have spent around 3
> > > months fighting with our Billing department and
> > have
> > > not win the battle (but the war is not yet over).
> > >
> > > TIA
> > > Drasko
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Make international calls for as low as $.04/minute
> > with Yahoo! Messenger
> > > http://phonecard.yahoo.com/
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > Please check that your question has not already
> > been answered in the
> > > FAQ before posting.
> > <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail:
> > <cocoon-users-unsubscribe@xml.apache.org>
> > > For additional commands, e-mail:
> > <cocoon-users-help@xml.apache.org>
> > >
> > >
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > Please check that your question has not already been
> > answered in the
> > FAQ before posting.
> > <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail:
> > <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:
> > <cocoon-users-help@xml.apache.org>
> >
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message