作者:齐林 时间:
2013/9/11
DWR 安装
1.参 考 文 档 : http://
directwebremoting.org/
dwr/introduction/
getting-started.html
2.用到的 JAR
3.配置 web.xml
<servlet>
<display-
name>DWR
Servlet</display-name>
<servlet-name>dwr-invoker</servlet-name>
<servlet-
class>org.directwebremoting.servlet.DwrServlet</servlet-
class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
4.创建 dwr.xml
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting
3.0//EN"
"http://getahead.org/dwr/dwr30.dtd">
<dwr>
<allow>
<create creator="new" javascript="JDate">
<param name="class" value="java.util.Date"/>
</create>
<create creator="new" javascript="person">
<param name="class" value="dwr.qilin.Person"/>
</create>
</allow>
</dwr>
评论0