DWR拦截器
来源:互联网 发布:为什么叫矩阵革命 编辑:程序博客网 时间:2024/06/11 15:57
web.xml
<servlet>
<servlet-name>dwr</servlet-name>
<!-- org.directwebremoting.spring.DwrSpringServlet -->
<servlet-class>
org.directwebremoting.servlet.DwrServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
<!--开发时设为true,生产时设为false-->
</init-param>
<init-param>
<param-name>
org.directwebremoting.extend.Remoter
</param-name>
<param-value>filters.AuthorityDWRRemoter</param-value>
</init-param>
<init-param>
<param-name>activeReverseAjaxEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>crossDomainSessionSecurity</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>exposeInternals</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>scriptCompressed</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
处理类:
public class AuthorityDWRRemoter extends DefaultRemoter{
public Replies execute( Calls calls )
{
HttpSession session = WebContextFactory.get().getSession();
GlobalInput mGlobalInput=(GlobalInput) session.getAttribute("GI");
//session检查
if(mGlobalInput==null){
logOut();
return super.execute( new Calls() );
}
return super.execute( calls );
}
private void logOut()
{
WebContext wct = WebContextFactory.get();
Util utilThis = new Util(wct.getScriptSession());
utilThis.addScript( new ScriptBuffer("_DWRLogout()"));
}
}
- DWR拦截器
- dwr
- dwr
- dwr
- DWR
- DWR
- DWR
- dwr
- dwr
- DWR
- DWR
- DWR
- dwr
- dwr
- dwr
- dwr
- DWR
- dwr
- 今年将力争应届普通高校毕业生初次就业率达到70%左右
- WIN32多线程程序设计学习笔记(第六章 下)
- Struts2.0与DWR2.0的整和
- 男人:你是“橙皮男”还是“草莓男”?
- 编程实用小例征集
- DWR拦截器
- 用MFC写对话框形式的DLL并用程序进行调用方法
- css选择器模式
- NHibernate的关联映射(one-to-one,one-to-many,many-to-many)以及cascade分析
- CString to float 字符转换
- hibernate 详解
- 用JSP来实现文件下载功能的几种方式
- 努力加勤奋是什么?
- DWR 反向实例