AFAIK its protected at package level - so the hack is then to create a class in the same package and then you have access to that member - thats the way I do it.
-----Original Message----- From: Paul Crabtree [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 12:49 PM To: [EMAIL PROTECTED] Subject: RE: [flow] accessing the real HttpServletRequest I've thought about this but im not sure how to start. Does this class need to be an Avalon component? Are there any simple classes doing similar things that i can have a look at and give me somewhere to start? Im fairly competent with Java but not too familar with Avalon and Cocoon components. Paul. -----Original Message----- From: Reinhard Poetz [mailto:[EMAIL PROTECTED] Sent: 03 December 2003 12:15 To: [EMAIL PROTECTED] Subject: RE: [flow] accessing the real HttpServletRequest 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] _____________________________________________________________________ This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
