From: Paul Crabtree

> Hi,
> 
> I'm trying to get access to the real HttpServletRequest from 
> inside Flow because i need to suck in the contents of a post 
> into a Document using getInputStream().
> 
> There doesnt seem to be a cocoon equivalent and in the 
> StreamGenerator, which has similar functionality it gets the 
> real request from the ObjectModel, something i cant seem to 
> get either from within Flow.
> 
> Can anyone suggest a method for doing this?

Create your own special class and pass the Cocoon object to it. The
Cocoon object used within your own class has a method that returns the
Cocoon request object which can be casted to the HttpServletRequest.

If you use CVS head you can use "setupObject(yourObject)". This method
calls the various lifecycle methods you implement. This will be the
preferred way in the future (Cocoon 2.1.4) because it is cleaner from an
IoC point of view.
More infos in the Javadocs of
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.setupObject(
) and in the cocoon-dev archives - see
http://marc.theaimsgroup.com/?t=106934224400008&r=1&w=2

--
Reinhard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to