DWR is a very good java ajax framework. and it has bean integrate with many frameworks like struts2, spring, hibernate... and many other client ajax frameworks, like dojo, tibco gi, yui....
DWR是一个非常好的java ajax框架。它有bean集成了许多框架,如struts2、spring、hibernate……和许多其他客户端ajax框架,像dojo,tibco gi,yui ....
is there any way to integrate dwr 3.0 with play?
是否有办法将dwr 3.0与play结合?
2 个解决方案
#1
2
It's probably quite difficult. DWR needs a servlet (declared in WEB-INF/web.xml) to handle requests.
它可能非常困难。DWR需要一个servlet(在WEB-INF/web.xml中声明)来处理请求。
Since Play Framework doesn't use servlets, integrating DWR in Play Framework requires:
由于Play框架不使用servlet,在Play框架中集成DWR需要:
- To develop a controller to handle requests, emulating the DWR servlet (this part can be very difficult depending on the servlet complexity).
- 要开发一个控制器来处理请求,可以模拟DWR servlet(这一部分非常困难,这取决于servlet的复杂性)。
- To routes all DWR requests to this controller.
- 将所有DWR请求路由到此控制器。
#2
1
I integrated DWR with Play using apache at the front webserver. Like for example
我在前端webserver上使用apache集成了DWR和Play。比如
http://www.mysite.com/dwr -> Points to DWR http://www.mysite.com/site -> Points to Play
http://www.mysite.com/dwr ->指向DWR http://www.mysite.com/site ->指向播放
Then as both sites are in the same domain, cookies are shared and also authentication
然后,由于两个站点都位于相同的域中,所以cookie是共享的,而且还进行身份验证
#1
2
It's probably quite difficult. DWR needs a servlet (declared in WEB-INF/web.xml) to handle requests.
它可能非常困难。DWR需要一个servlet(在WEB-INF/web.xml中声明)来处理请求。
Since Play Framework doesn't use servlets, integrating DWR in Play Framework requires:
由于Play框架不使用servlet,在Play框架中集成DWR需要:
- To develop a controller to handle requests, emulating the DWR servlet (this part can be very difficult depending on the servlet complexity).
- 要开发一个控制器来处理请求,可以模拟DWR servlet(这一部分非常困难,这取决于servlet的复杂性)。
- To routes all DWR requests to this controller.
- 将所有DWR请求路由到此控制器。
#2
1
I integrated DWR with Play using apache at the front webserver. Like for example
我在前端webserver上使用apache集成了DWR和Play。比如
http://www.mysite.com/dwr -> Points to DWR http://www.mysite.com/site -> Points to Play
http://www.mysite.com/dwr ->指向DWR http://www.mysite.com/site ->指向播放
Then as both sites are in the same domain, cookies are shared and also authentication
然后,由于两个站点都位于相同的域中,所以cookie是共享的,而且还进行身份验证