The ServerContextFactory.get() only works if dwr has been already called from
a dwr initiated thread, otherwise it returns null.


BarryDev wrote:
> 
> Got the reverse ajax method working.  An interesting gotcha if trying to
> trigger a dwr reverse ajax call from a tapestry thread you need to get
> hold of the servlet context, 
> 
> @Inject
> @Service("ApplicationGlobals")
> private ApplicationGlobals applicationGlobals;
> 
> and than use this to load dwr's servercontext:
> serverContext = ServerContextFactory.get(servletContext);
> 
> which allows you to get all script sessions currently logged in:
> serverContext.getScriptSessionsByPage("/chatroom/chatroom")
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Getting-DWR-to-work-with-tapestry%27s-filter-mapping-tp20361316p20393481.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