pre: Google Web Toolkit

 

Learning to writting in english:

I have followed the Google Web Toolkit official tutorial to build the StockWatcher few  day ago.

Just a basic understanding of it. At once, I want to use it to build some app. But not yet now(Maybe I always say that.Although it is very difficult,  I believe I can change this situation.Come on~)


ok~ the next is...

Learn to build a simple python/django web app. bless me~ : ).

About DWR ScriptSession

this article is talking about what wo need to pay attention to the issue of ScriptSession. Providing the URL is don't

DWR推技术在开发中需要注意的ScriptSession问题

 

 Because don't want to going on showing my poor english, stoping writing in english here. next times will go on!

其实该文章中的说到的几点我都在前几天对DWR的折腾中了解到了.....有人总结了,就记录一下。

但是,我是出现了个很莫名奇妙的问题,我使用了DWR3.0 R1 的 new feature , ScriptSessionListener : interface.

 since  implement this interface, we should override two function:sessionCreated(ScriptSessionEvent e) and sessionDestoryed(...).

当有 ScriptSession 被创建的时候, 就会执行 sessionCreated() 方法。 这时候就可以对 HttpSession 和 创建的 scriptSession 进行绑定了..

另一个就做相反操作。

网上有些人的问题是这两个方法没有被调用...但是,我的情况是,每创建一个scriptSession 就会调用 sessionCreated() 很多次...而sessionDestoryed() 就正常调用...... = =. 目前来说没有找到有相同情况的.....搞不懂什么原因了.....

根据网上的资料,我没有在web.xml配置文件里对 implements 进行声明,如下例子:

 

		<init-param>
			<param-name>
				org.directwebremoting.event.ScriptSessionListener
			</param-name>
			<param-value>
				listener.ScriptSessionListenerImpl,
			</param-value>
		</init-param>

不知道是不是这个原因, 觉得应该不是,,,,明天试试....