You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by comett <se...@yahoo.com> on 2008/01/17 10:17:50 UTC

pass response

in my service,  public void service(IRequestCycle cycle), i pass
"HttpServletResponse" to new Thread, in the new thread, i execute 
response.getwriter().print("xxx").. , i get the bottom error. if i not using new
thread, response print can display properly, but with thread, i cannot do that.
any idea where i did wrong?
 


Exception in thread "Thread-34" java.lang.NullPointerException: Property
'response' of <OuterProxy for
tapestry.globals.RequestGlobals(org.apache.tapestry.services.RequestGlobals)> is
null.



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


Re: pass response

Posted by Ted Steen <te...@gmail.com>.
many services only lives during the request/response cycle, so doing
things in threads is not a good idea as the objects behind the proxies
may be invalid when/while you use them.

so the solution would be not to use threads.
what are you trying to do?

2008/1/17, comett <se...@yahoo.com>:
> in my service,  public void service(IRequestCycle cycle), i pass
> "HttpServletResponse" to new Thread, in the new thread, i execute
> response.getwriter().print("xxx").. , i get the bottom error. if i not using new
> thread, response print can display properly, but with thread, i cannot do that.
> any idea where i did wrong?
>
>
>
> Exception in thread "Thread-34" java.lang.NullPointerException: Property
> 'response' of <OuterProxy for
> tapestry.globals.RequestGlobals(org.apache.tapestry.services.RequestGlobals)> is
> null.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
/ted

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