在weblogic下部署dwr,很长一段时间都不能实现其推送,而在tomcat上就可以,后来网上查了下,原来是需要在weblogic.xml中设置cook:
通过DWR官网上的一则Bug记录(http://directwebremoting.org/jira/browse/DWR-450),DWR需要Session Cookies的支持,而Weblogic默认情况下Session Cookies被禁止。在Web应用的WEB-INF目录下增加weblogic.xml文件,内容如下(xxx表示的context路径根据实际情况设置):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<context-root>/xxx</context-root>
<session-descriptor>
<cookie-http-only>false</cookie-http-only>
</session-descriptor>
</weblogic-web-app>