* session超时销毁调用
*/
@SuppressWarnings("unchecked")
public void sessionDestroyed(HttpSessionEvent hse )
{
//取得用户名列表
Map<Long,UserView> online=(Map<Long,UserView>)application.getAttribute("Online") ;
//取得当前用户名
UserView userView=(UserView)hse.getSession().getAttribute(Constants.USER_VIEW) ;
//将此用户名从列表中删除
if(userView!=null)
online.remove(userView.getUser().getUserId()) ;
//将删除后的列表重新设置到application属性中
application.setAttribute("Online", online) ;
这里怎么获取响应对象 给出提示呢?
*/
@SuppressWarnings("unchecked")
public void sessionDestroyed(HttpSessionEvent hse )
{
//取得用户名列表
Map<Long,UserView> online=(Map<Long,UserView>)application.getAttribute("Online") ;
//取得当前用户名
UserView userView=(UserView)hse.getSession().getAttribute(Constants.USER_VIEW) ;
//将此用户名从列表中删除
if(userView!=null)
online.remove(userView.getUser().getUserId()) ;
//将删除后的列表重新设置到application属性中
application.setAttribute("Online", online) ;
这里怎么获取响应对象 给出提示呢?
在flex中应该是建立了tcp连接的,有另外的处理方式。
这里在web.XML 中有是 servlet listener 超时的!
那我上面的代码怎么给出提示到页面呢?