---
title: "websphere dwr session error "
author: "fireinjava"
date: "2013-09-15T20:43:27Z"
tags: []
categories: ["Web前端"]
slug: "websphere-dwr-session-error"
draft: false
lastmod: "2013-09-20T15:07:15Z"
id: 1942452
url: "https://fireinjava.iteye.com/blog/1942452"
---

**websphere8.5容器部署dwr应用。** 

dwr 弹出的session error 问题，后台提示：A request has been denied as a potential CSRF attack。

 网上找的设置初始参数crossDomainSessionSecurity方法一直试不成功。

 

解决方法：改下以下配置，不用在web.xml配置crossDomainSessionSecurity：

1.dwr.jar替换成version: 2.0.4版本

2.应用程序服务器 &gt; server1 &gt; 会话管理 &gt; 启用Cookie

 将会话 cookie 设置为 HTTPOnly，以帮助防止跨站点的脚本编制攻击(去掉此勾选)  
![](http://dl2.iteye.com/upload/attachment/0089/4719/d27ff746-86dc-38d7-8cd3-e9e641f67833.jpg)  
 

重启websphere服务器即可。