Thanks Thiago, let me see if i understand, so in my tapestry 4 page i use the
storeServletRequestResponse method to store them and then i call my service?
i guess im missing something here



Thiago H. de Paula Figueiredo wrote:
> 
> Em Thu, 08 Oct 2009 20:55:04 -0300, cuartz <[email protected]>  
> escreveu:
> 
>> Hello everybody,
> 
> Hi!
> 
>> i had a problem trying to use the tapestr5 IoC from tapestry 4 pages,  
>> its a big system whit tpaestry5 and tapestry 4 pages, when i call a  
>> service that handles the request (org.apache.tapestry5.services.Request)
>> from tapestry5 pages everything is ok, but when i call this service from  
>> a tapestry4 page i get a java.lang.RuntimeException, everithing is ok  
>> but when the service call some method from the request i get this error.
> 
> I guess this happens because Request is a shadow service: actually, when  
> you use an injected instance of it, you're calling  
> RequestGlobals.getRequest(). This method returns a Request instance set  
> during Tapestry 5 request processing. Whan a request is handled by  
> Tapestry 4, RequestGlobal, which is a perthread service, doesn't have the  
> Request set, then you have your exception. One possible solution is to  
> invoke RequestGlobals.storeRequestResponse(Request request, Response  
> response) yourself before Request is used.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tapestry5-IoC-and-Request-problem-tp25813570p25824956.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to