cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Java Developer <develop4f...@yahoo.com>
Subject Re: How to access Session/Request object inside Transformer class
Date Fri, 02 Jul 2004 00:54:51 GMT
Thanks for your mail, but I really couldn't figure out how to use it. 

Just wanna rephrase my requirement : 
Out of two pipeline calls, from the main pipeline, first pipeline 
serializes into image-jpeg, and the other pipeline renders the html
page. Since I didn't and don't know how to take output from one
pipeline whose mime-type is image/jpeg, into the other pipeline and
append the img tag and display this image in the html output of the
other pipeline. 

FYI : I found out that inside setup mthd of Transformer I can get hold
of request and since session object..like 

        this.request = ObjectModelHelper.getRequest(objectModel);

But as i said I m not very comfortable with this solution and want to
know if there is any well or not very well known approach to it ?


Thanks much ...

-S

--- Joerg Heinicke <joerg.heinicke@gmx.de> wrote:
> On 02.07.2004 00:17, Java Developer wrote:
> 
> > Hi All, 
> > 
> > I am writing a webbapp which generates charts inside a dynamically
> > generated html page using cocoon and fins block. 
> > 
> > My problem is I m looking for a simpler way so that, in a pipeline,
> I
> > should be able to :
> > 
> > 1. Generate the xml //Done ..not a problem
> > 2. Transform into image stream // partially done...that is THE
> PROBLEM
> > 3. Get the original xml back //Done..not a problem
> > 4. Transform using xsl//Done..not a problem
> > 5. Serialize into html //with image tag that points to step 2
> generated
> > image. 
> > 
> > Currently I m saving the image generated in step 2 and html is
> reading
> > it..which includes an IO operation(which i obiviously want to
> avoid). 
> > 
> > Other way could be storing the image stream into session by
> modifying
> > step 2 transformer, later rendering the image using servlet or
> > jsp.(which is again a server call..but should be faster than IO,
> love
> > to know any better way of doing it)
> > 
> > My first question is how to access http request or session inside
> > cocoon transformer, and second is Am I trying to reinvent the wheel
> > again ? is anybody has a better way for displaying image in an html
> > page using cocoon in the current scenario ??
> > 
> > Thanks much for your help and suggestions. 
> > 
> > I apologize being so fussy sounding too demanding. 
> 
> Have a look on the FragmentExtractorTransformer + Generator. From
> what I 
> understand it's exactly the thing you need.
> 
> Joerg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


=====
- Java Developer


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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


Mime
View raw message