DWR配置

来源:百度文库 编辑:神马文学网 时间:2024/04/27 14:29:35
1、web.xml 文件配置
  contextConfigLocation
  classpath*:dwrContext.xml;classpath*:com/rjsoft/ccss/bbs/bbs-ds.xml;classpath*:com/rjsoft/ccss/pubs/applicationContext-ccss.xml
 

 
  org.springframework.web.context.ContextLoaderListener
 

 
 
  dwr-invoker
 
   org.directwebremoting.spring.DwrSpringServlet
 

 
   debug
   true
 

 

 
  dwr-invoker
  /dwr/*
 
2、dwrContext.xml  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:dwr ="http://www.directwebremoting.org/schema/spring-dwr"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd"
  default-autowire="byName" default-lazy-init="true"> 
 
 

 
 
 
           
       

 
  
 

 
  
 

 
  
 

 

 
3、DS.xml

4、dwr.javapublic class VoteDwr { private IVoteNoteDS voteNoteDS;
 private IVoteOptionDS voteOptionDS;
 private IUserVoteOptionDS userVoteOptionDS;
 public IVoteNoteDS getVoteNoteDS() {
  return voteNoteDS;
 }
 public void setVoteNoteDS(IVoteNoteDS voteNoteDS) {
  this.voteNoteDS = voteNoteDS;
 }
 public IVoteOptionDS getVoteOptionDS() {
  return voteOptionDS;
 }
 public void setVoteOptionDS(IVoteOptionDS voteOptionDS) {
  this.voteOptionDS = voteOptionDS;
 }
 public IUserVoteOptionDS getUserVoteOptionDS() {
  return userVoteOptionDS;
 }
 public void setUserVoteOptionDS(IUserVoteOptionDS userVoteOptionDS) {
  this.userVoteOptionDS = userVoteOptionDS;
 }
 public List saveVote(List list,String voiteFlag,String userCode,Integer voteNoteId) throws Exception
 {   return null;} 本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/sony87615/archive/2009/09/08/4532244.aspx