 
  applicationContext.xml
 applicationContext.xml 
 1  <? xml version="1.0" encoding="UTF-8" ?>
 <? xml version="1.0" encoding="UTF-8" ?> 
 2  <! DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
 <! DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
 3  "http://www.springframework.org/dtd/spring-beans.dtd" >
    "http://www.springframework.org/dtd/spring-beans.dtd" > 
 4  
 
 5  < beans >
 < beans > 
 6  < bean  id ="propertyConfigurer"
     < bean  id ="propertyConfigurer" 
 7  class ="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
        class ="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > 
 8  < property  name ="location"  value ="classpath:jdbc.properties"   />
         < property  name ="location"  value ="classpath:jdbc.properties"   /> 
 9  </ bean >
     </ bean > 
10  
 
11  <!--  Transaction template for Managers, from:
     <!--  Transaction template for Managers, from:
12  http://blog.exis.com/colin/archives/2004/07/31/concise-transaction-definitions-spring-11/  -->
        http://blog.exis.com/colin/archives/2004/07/31/concise-transaction-definitions-spring-11/  --> 
13  < bean  id ="txProxyTemplate"  abstract ="true"
     < bean  id ="txProxyTemplate"  abstract ="true" 
14  class ="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >
        class ="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" > 
15  < property  name ="transactionManager" >
         < property  name ="transactionManager" > 
16  < ref  bean ="transactionManager"   />
             < ref  bean ="transactionManager"   /> 
17  </ property >
         </ property > 
18  < property  name ="transactionAttributes" >
         < property  name ="transactionAttributes" > 
19  < props >
             < props > 
20  < prop  key ="save*" > PROPAGATION_REQUIRED </ prop >
                 < prop  key ="save*" > PROPAGATION_REQUIRED </ prop > 
21  < prop  key ="remove*" > PROPAGATION_REQUIRED </ prop >
                 < prop  key ="remove*" > PROPAGATION_REQUIRED </ prop > 
22  < prop  key ="*" > PROPAGATION_REQUIRED,readOnly </ prop >
                 < prop  key ="*" > PROPAGATION_REQUIRED,readOnly </ prop > 
23  </ props >
             </ props > 
24  </ property >
         </ property > 
25  </ bean >
     </ bean > 
26  
 
27  < bean  id ="userManager"  parent ="txProxyTemplate" >
     < bean  id ="userManager"  parent ="txProxyTemplate" > 
28  < property  name ="target" >
         < property  name ="target" > 
29  < bean  class ="com.mygame.service.impl.UserManagerImpl" >
             < bean  class ="com.mygame.service.impl.UserManagerImpl" > 
30  < property  name ="userDAO"  ref ="userDAO"   />
                 < property  name ="userDAO"  ref ="userDAO"   /> 
31  </ bean >
             </ bean > 
32  </ property >
         </ property > 
33  </ bean >
     </ bean > 
34  <!-- Area-START -->
     <!-- Area-START --> 
35  < bean  id ="areaManager"  parent ="txProxyTemplate" >
     < bean  id ="areaManager"  parent ="txProxyTemplate" > 
36  < property  name ="target" >
         < property  name ="target" > 
37  < bean  class ="com.mygame.service.impl.AreaManagerImpl" >
             < bean  class ="com.mygame.service.impl.AreaManagerImpl" > 
38  < property  name ="areaDao"  ref ="areaDao"   />
                 < property  name ="areaDao"  ref ="areaDao"   /> 
39  </ bean >
             </ bean > 
40  </ property >
         </ property > 
41  </ bean >
     </ bean > 
42  <!-- Area-END -->
     <!-- Area-END --> 
43  <!-- Game-START -->
     <!-- Game-START --> 
44  < bean  id ="gameManager"  parent ="txProxyTemplate" >
     < bean  id ="gameManager"  parent ="txProxyTemplate" > 
45  < property  name ="target" >
         < property  name ="target" > 
46  < bean  class ="com.mygame.service.impl.GameManagerImpl" >
             < bean  class ="com.mygame.service.impl.GameManagerImpl" > 
47  < property  name ="gameDao"  ref ="gameDao"   />
                 < property  name ="gameDao"  ref ="gameDao"   /> 
48  </ bean >
             </ bean > 
49  </ property >
         </ property > 
50  </ bean >
     </ bean > 
51  <!-- Game-END -->
     <!-- Game-END --> 
52  <!-- Player-START -->
     <!-- Player-START --> 
53  < bean  id ="playerManager"  parent ="txProxyTemplate" >
     < bean  id ="playerManager"  parent ="txProxyTemplate" > 
54  < property  name ="target" >
         < property  name ="target" > 
55  < bean  class ="com.mygame.service.impl.PlayerManagerImpl" >
             < bean  class ="com.mygame.service.impl.PlayerManagerImpl" > 
56  < property  name ="playerDao"  ref ="playerDao"   />
                 < property  name ="playerDao"  ref ="playerDao"   /> 
57  </ bean >
             </ bean > 
58  </ property >
         </ property > 
59  </ bean >
     </ bean > 
60  <!-- Player-END -->
     <!-- Player-END --> 
61  <!-- Sale-START -->
     <!-- Sale-START --> 
62  < bean  id ="saleManager"  parent ="txProxyTemplate" >
     < bean  id ="saleManager"  parent ="txProxyTemplate" > 
63  < property  name ="target" >
         < property  name ="target" > 
64  < bean  class ="com.mygame.service.impl.SaleManagerImpl" >
             < bean  class ="com.mygame.service.impl.SaleManagerImpl" > 
65  < property  name ="saleDao"  ref ="saleDao"   />
                 < property  name ="saleDao"  ref ="saleDao"   /> 
66  </ bean >
             </ bean > 
67  </ property >
         </ property > 
68  </ bean >
     </ bean > 
69  <!-- Sale-END -->
     <!-- Sale-END --> 
70  <!-- Server-START -->
     <!-- Server-START --> 
71  < bean  id ="serverManager"  parent ="txProxyTemplate" >
     < bean  id ="serverManager"  parent ="txProxyTemplate" > 
72  < property  name ="target" >
         < property  name ="target" > 
73  < bean  class ="com.mygame.service.impl.ServerManagerImpl" >
             < bean  class ="com.mygame.service.impl.ServerManagerImpl" > 
74  < property  name ="serverDao"  ref ="serverDao"   />
                 < property  name ="serverDao"  ref ="serverDao"   /> 
75  </ bean >
             </ bean > 
76  </ property >
         </ property > 
77  </ bean >
     </ bean > 
78  <!-- Server-END -->
     <!-- Server-END --> 
79  
 
80  </ beans >
 </ beans >  
  action-servlet.xml
 action-servlet.xml 
 1  <? xml version="1.0" encoding="UTF-8" ?>
 <? xml version="1.0" encoding="UTF-8" ?> 
 2  <! DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
 <! DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
 3  "http://www.springframework.org/dtd/spring-beans.dtd" >
    "http://www.springframework.org/dtd/spring-beans.dtd" > 
 4  
 
 5  < beans >
 < beans > 
 6  < bean  id ="userAction"  class ="com.mygame.web.UserAction"
     < bean  id ="userAction"  class ="com.mygame.web.UserAction" 
 7  singleton ="false" >
        singleton ="false" > 
 8  < property  name ="userManager"  ref ="userManager"   />
         < property  name ="userManager"  ref ="userManager"   /> 
 9  </ bean >
     </ bean > 
10  <!-- Game-START -->
     <!-- Game-START --> 
11  < bean  id ="gameAction"  class ="com.mygame.web.GameAction"
     < bean  id ="gameAction"  class ="com.mygame.web.GameAction" 
12  singleton ="false" >
        singleton ="false" > 
13  < property  name ="gameManager"  ref ="gameManager"   />
         < property  name ="gameManager"  ref ="gameManager"   /> 
14  </ bean >
     </ bean > 
15  <!-- Game-END -->
     <!-- Game-END --> 
16  <!-- Area-START -->
     <!-- Area-START --> 
17  < bean  id ="areaAction"  class ="com.mygame.web.AreaAction"
     < bean  id ="areaAction"  class ="com.mygame.web.AreaAction" 
18  singleton ="false" >
        singleton ="false" > 
19  < property  name ="areaManager"  ref ="areaManager"   />
         < property  name ="areaManager"  ref ="areaManager"   /> 
20  </ bean >
     </ bean > 
21  <!-- Area-END -->
     <!-- Area-END --> 
22  <!-- Server-START -->
     <!-- Server-START --> 
23  < bean  id ="serverAction"  class ="com.mygame.web.ServerAction"
     < bean  id ="serverAction"  class ="com.mygame.web.ServerAction" 
24  singleton ="false" >
        singleton ="false" > 
25  < property  name ="serverManager"  ref ="serverManager"   />
         < property  name ="serverManager"  ref ="serverManager"   /> 
26  </ bean >
     </ bean > 
27  <!-- Server-END -->
     <!-- Server-END --> 
28  <!-- Sale-START -->
     <!-- Sale-START --> 
29  < bean  id ="saleAction"  class ="com.mygame.web.SaleAction"
     < bean  id ="saleAction"  class ="com.mygame.web.SaleAction" 
30  singleton ="false" >
        singleton ="false" > 
31  < property  name ="saleManager"  ref ="saleManager"   />
         < property  name ="saleManager"  ref ="saleManager"   /> 
32  </ bean >
     </ bean > 
33  <!-- Sale-END -->
     <!-- Sale-END --> 
34  <!-- Player-START -->
     <!-- Player-START --> 
35  < bean  id ="playerAction"  class ="com.mygame.web.PlayerAction"
     < bean  id ="playerAction"  class ="com.mygame.web.PlayerAction" 
36  singleton ="false" >
        singleton ="false" > 
37  < property  name ="playerManager"  ref ="playerManager"   />
         < property  name ="playerManager"  ref ="playerManager"   /> 
38  </ bean >
     </ bean > 
39  <!-- Player-END -->
     <!-- Player-END --> 
40  </ beans >
 </ beans >  
  applicationContext-ibatis.xml
 applicationContext-ibatis.xml 
 1  <? xml version="1.0" encoding="UTF-8" ?>
 <? xml version="1.0" encoding="UTF-8" ?> 
 2  <! DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
 <! DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
 3  "http://www.springframework.org/dtd/spring-beans.dtd" >
    "http://www.springframework.org/dtd/spring-beans.dtd" > 
 4  
 
 5  < beans >
 < beans > 
 6  < bean  id ="dataSource"
     < bean  id ="dataSource" 
 7  class ="org.apache.commons.dbcp.BasicDataSource"
        class ="org.apache.commons.dbcp.BasicDataSource" 
 8  destroy-method ="close" >
        destroy-method ="close" > 
 9  < property  name ="driverClassName"
         < property  name ="driverClassName" 
10  value ="${jdbc.driverClassName}"   />
            value ="${jdbc.driverClassName}"   /> 
11  < property  name ="url"  value ="${jdbc.url}"   />
         < property  name ="url"  value ="${jdbc.url}"   /> 
12  < property  name ="username"  value ="${jdbc.username}"   />
         < property  name ="username"  value ="${jdbc.username}"   /> 
13  < property  name ="password"  value ="${jdbc.password}"   />
         < property  name ="password"  value ="${jdbc.password}"   /> 
14  < property  name ="maxActive"  value ="30"   />
         < property  name ="maxActive"  value ="30"   /> 
15  < property  name ="maxIdle"  value ="10"   />
         < property  name ="maxIdle"  value ="10"   /> 
16  < property  name ="maxWait"  value ="1000"   />
         < property  name ="maxWait"  value ="1000"   /> 
17  < property  name ="defaultAutoCommit"  value ="true"   />
         < property  name ="defaultAutoCommit"  value ="true"   /> 
18  </ bean >
     </ bean > 
19  
 
20  <!--  Transaction manager for iBATIS DAOs  -->
     <!--  Transaction manager for iBATIS DAOs  --> 
21  < bean  id ="transactionManager"
     < bean  id ="transactionManager" 
22  class ="org.springframework.jdbc.datasource.DataSourceTransactionManager" >
        class ="org.springframework.jdbc.datasource.DataSourceTransactionManager" > 
23  < property  name ="dataSource"  ref ="dataSource"   />
         < property  name ="dataSource"  ref ="dataSource"   /> 
24  </ bean >
     </ bean > 
25  
 
26  <!--  SqlMap setup for iBATIS Database Layer  -->
     <!--  SqlMap setup for iBATIS Database Layer  --> 
27  < bean  id ="sqlMapClient"
     < bean  id ="sqlMapClient" 
28  class ="org.springframework.orm.ibatis.SqlMapClientFactoryBean" >
        class ="org.springframework.orm.ibatis.SqlMapClientFactoryBean" > 
29  < property  name ="dataSource"  ref ="dataSource"   />
         < property  name ="dataSource"  ref ="dataSource"   /> 
30  < property  name ="configLocation"
         < property  name ="configLocation" 
31  value ="classpath:/com/mygame/dao/ibatis/sql-map-config.xml"   />
            value ="classpath:/com/mygame/dao/ibatis/sql-map-config.xml"   /> 
32  </ bean >
     </ bean > 
33  
 
34  < bean  id ="userIncrementer"
     < bean  id ="userIncrementer" 
35  class ="org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer" >
        class ="org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer" > 
36  < property  name ="dataSource"  ref ="dataSource"   />
         < property  name ="dataSource"  ref ="dataSource"   /> 
37  < property  name ="incrementerName"  value ="user_sequence"   />
         < property  name ="incrementerName"  value ="user_sequence"   /> 
38  <!-- property name="columnName"><value>value</value></property -->
         <!-- property name="columnName"><value>value</value></property --> 
39  </ bean >
     </ bean > 
40  
 
41  < bean  id ="userDAO"  class ="com.mygame.dao.ibatis.UserDAOiBatis" >
     < bean  id ="userDAO"  class ="com.mygame.dao.ibatis.UserDAOiBatis" > 
42  < property  name ="incrementer"  ref ="userIncrementer"   />
         < property  name ="incrementer"  ref ="userIncrementer"   /> 
43  < property  name ="sqlMapClient"  ref ="sqlMapClient"   />
         < property  name ="sqlMapClient"  ref ="sqlMapClient"   /> 
44  </ bean >
     </ bean > 
45  <!-- Area-START -->
     <!-- Area-START --> 
46  < bean  id ="areaDao"  class ="com.mygame.dao.ibatis.AreaDaoiBatis" >
     < bean  id ="areaDao"  class ="com.mygame.dao.ibatis.AreaDaoiBatis" > 
47  < property  name ="dataSource"  ref ="dataSource"   />
         < property  name ="dataSource"  ref ="dataSource"   /> 
48  < property  name ="sqlMapClient"  ref ="sqlMapClient"   />
         < property  name ="sqlMapClient"  ref ="sqlMapClient"   /> 
49  </ bean >
     </ bean > 
50  <!-- Area-END -->
     <!-- Area-END --> 
51  <!-- Game-START -->
     <!-- Game-START --> 
52  < bean  id ="gameDao"  class ="com.mygame.dao.ibatis.GameDaoiBatis" >
     < bean  id ="gameDao"  class ="com.mygame.dao.ibatis.GameDaoiBatis" > 
53  < property  name ="dataSource"  ref ="dataSource"   />
         < property  name ="dataSource"  ref ="dataSource"   /> 
54  < property  name ="sqlMapClient"  ref ="sqlMapClient"   />
         < property  name ="sqlMapClient"  ref ="sqlMapClient"   /> 
55  </ bean >
     </ bean > 
56  <!-- Game-END -->
     <!-- Game-END --> 
57  <!-- Player-START -->
     <!-- Player-START --> 
58  < bean  id ="playerDao"
     < bean  id ="playerDao" 
59  class ="com.mygame.dao.ibatis.PlayerDaoiBatis" >
        class ="com.mygame.dao.ibatis.PlayerDaoiBatis" > 
60  < property  name ="dataSource"  ref ="dataSource"   />
         < property  name ="dataSource"  ref ="dataSource"   /> 
61  < property  name ="sqlMapClient"  ref ="sqlMapClient"   />
         < property  name ="sqlMapClient"  ref ="sqlMapClient"   /> 
62  </ bean >
     </ bean > 
63  <!-- Player-END -->
     <!-- Player-END --> 
64  <!-- Sale-START -->
     <!-- Sale-START --> 
65  < bean  id ="saleDao"  class ="com.mygame.dao.ibatis.SaleDaoiBatis" >
     < bean  id ="saleDao"  class ="com.mygame.dao.ibatis.SaleDaoiBatis" > 
66  < property  name ="dataSource"  ref ="dataSource"   />
         < property  name ="dataSource"  ref ="dataSource"   /> 
67  < property  name ="sqlMapClient"  ref ="sqlMapClient"   />
         < property  name ="sqlMapClient"  ref ="sqlMapClient"   /> 
68  </ bean >
     </ bean > 
69  <!-- Sale-END -->
     <!-- Sale-END --> 
70  <!-- Server-START -->
     <!-- Server-START --> 
71  < bean  id ="serverDao"
     < bean  id ="serverDao" 
72  class ="com.mygame.dao.ibatis.ServerDaoiBatis" >
        class ="com.mygame.dao.ibatis.ServerDaoiBatis" > 
73  < property  name ="dataSource"  ref ="dataSource"   />
         < property  name ="dataSource"  ref ="dataSource"   /> 
74  < property  name ="sqlMapClient"  ref ="sqlMapClient"   />
         < property  name ="sqlMapClient"  ref ="sqlMapClient"   /> 
75  </ bean >
     </ bean > 
76  <!-- Server-END -->
     <!-- Server-END --> 
77  <!--  Add additional DAO definitions here  -->
     <!--  Add additional DAO definitions here  --> 
78  </ beans >
 </ beans >  
  jdbc.properties
 jdbc.properties 
1  jdbc.driverClassName=org.postgresql.Driver
 jdbc.driverClassName=org.postgresql.Driver
2  jdbc.url=jdbc:postgresql://localhost/37game
jdbc.url=jdbc:postgresql://localhost/37game
3  jdbc.username=postgres
jdbc.username=postgres
4  jdbc.password=password
jdbc.password=password  
  jdbc.properties.mysql
 jdbc.properties.mysql 
1  jdbc.driverClassName=com.mysql.jdbc.Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
2  jdbc.url=jdbc:mysql://localhost/equinox?createDatabaseIfNotExist=true
jdbc.url=jdbc:mysql://localhost/equinox?createDatabaseIfNotExist=true
3  jdbc.username=root
jdbc.username=root
4  jdbc.password=
jdbc.password=  
  webwork.properties
 webwork.properties 
 1  # http://www.opensymphony.com/webwork/wikidocs/webwork.properties.html
 # http://www.opensymphony.com/webwork/wikidocs/webwork.properties.html
 2  
 
 3  webwork.objectFactory=spring
webwork.objectFactory=spring
 4  webwork.action.extension=html
webwork.action.extension=html
 5  webwork.custom.i18n.resources=messages
webwork.custom.i18n.resources=messages
 6  webwork.multipart.maxSize=2097152
webwork.multipart.maxSize=2097152
 7  
 
 8  ### when set to true, WebWork will act much more friendly for developers. This
### when set to true, WebWork will act much more friendly for developers. This
 9  ### includes:
### includes:
10  ### - webwork.i18n.reload = true
### - webwork.i18n.reload = true
11  ### - webwork.configuration.xml.reload = true
### - webwork.configuration.xml.reload = true
12  ### - raising various debug or ignorable problems to errors
### - raising various debug or ignorable problems to errors
13  ###   For example: normally a request to foo.action?someUnknownField=true should
###   For example: normally a request to foo.action?someUnknownField=true should
14  ###                be ignored (given that any value can come from the web and it
###                be ignored (given that any value can come from the web and it
15  ###                should not be trusted). However, during development, it may be
###                should not be trusted). However, during development, it may be
16  ###                useful to know when these errors are happening and be told of
###                useful to know when these errors are happening and be told of
17  ###                them right away.
###                them right away.
18  webwork.devMode=false
webwork.devMode=false
19  
 
20  ### Configuration reloading
### Configuration reloading
21  ### This will cause the configuration to reload xwork.xml when it is changed
### This will cause the configuration to reload xwork.xml when it is changed
22  webwork.configuration.xml.reload=true
webwork.configuration.xml.reload=true
23  
 
24  ### workaround for some app servers that don't handle HttpServletRequest.getParameterMap()
### workaround for some app servers that don't handle HttpServletRequest.getParameterMap()
25  ### often used for WebLogic, Orion, and OC4J
### often used for WebLogic, Orion, and OC4J
26  # webwork.dispatcher.parametersWorkaround = false
# webwork.dispatcher.parametersWorkaround = false  
  xwork.xml
 xwork.xml 
  1  <! DOCTYPE xwork PUBLIC
 <! DOCTYPE xwork PUBLIC 
  2  "-//OpenSymphony Group//XWork 1.1.1//EN"
    "-//OpenSymphony Group//XWork 1.1.1//EN"
  3  "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd" >
    "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd" > 
  4  
 
  5  < xwork >
 < xwork > 
  6  <!--  Include webwork defaults (from WebWork JAR)  -->
     <!--  Include webwork defaults (from WebWork JAR)  --> 
  7  < include  file ="webwork-default.xml"   />
     < include  file ="webwork-default.xml"   /> 
  8  
 
  9  <!--  Configuration for the default package.  -->
     <!--  Configuration for the default package.  --> 
 10  < package  name ="default"  extends ="webwork-default" >
     < package  name ="default"  extends ="webwork-default" > 
 11  < interceptors >
         < interceptors > 
 12  < interceptor-stack  name ="defaultStack" >
             < interceptor-stack  name ="defaultStack" > 
 13  < interceptor-ref  name ="exception"   />
                 < interceptor-ref  name ="exception"   /> 
 14  < interceptor-ref  name ="alias"   />
                 < interceptor-ref  name ="alias"   /> 
 15  < interceptor-ref  name ="servlet-config"   />
                 < interceptor-ref  name ="servlet-config"   /> 
 16  < interceptor-ref  name ="prepare"   />
                 < interceptor-ref  name ="prepare"   /> 
 17  < interceptor-ref  name ="i18n"   />
                 < interceptor-ref  name ="i18n"   /> 
 18  < interceptor-ref  name ="chain"   />
                 < interceptor-ref  name ="chain"   /> 
 19  < interceptor-ref  name ="model-driven"   />
                 < interceptor-ref  name ="model-driven"   /> 
 20  < interceptor-ref  name ="fileUpload"   />
                 < interceptor-ref  name ="fileUpload"   /> 
 21  < interceptor-ref  name ="static-params"   />
                 < interceptor-ref  name ="static-params"   /> 
 22  < interceptor-ref  name ="params"   />
                 < interceptor-ref  name ="params"   /> 
 23  < interceptor-ref  name ="conversionError"   />
                 < interceptor-ref  name ="conversionError"   /> 
 24  < interceptor-ref  name ="validation" >
                 < interceptor-ref  name ="validation" > 
 25  < param  name ="excludeMethods" >
                     < param  name ="excludeMethods" > 
 26  cancel,execute,delete,edit,list
                        cancel,execute,delete,edit,list
 27  </ param >
                     </ param > 
 28  </ interceptor-ref >
                 </ interceptor-ref > 
 29  < interceptor-ref  name ="workflow" >
                 < interceptor-ref  name ="workflow" > 
 30  < param  name ="excludeMethods" >
                     < param  name ="excludeMethods" > 
 31  input,back,cancel
                        input,back,cancel
 32  </ param >
                     </ param > 
 33  </ interceptor-ref >
                 </ interceptor-ref > 
 34  </ interceptor-stack >
             </ interceptor-stack > 
 35  </ interceptors >
         </ interceptors > 
 36  
 
 37  < global-results >
         < global-results > 
 38  < result  name ="dataAccessFailure" >
             < result  name ="dataAccessFailure" > 
 39  dataAccessFailure.jsp
                dataAccessFailure.jsp
 40  </ result >
             </ result > 
 41  </ global-results >
         </ global-results > 
 42  
 
 43  < global-exception-mappings >
         < global-exception-mappings > 
 44  < exception-mapping
             < exception-mapping
 45  exception ="org.springframework.dao.DataAccessException"
                 exception ="org.springframework.dao.DataAccessException" 
 46  result ="dataAccessFailure"   />
                result ="dataAccessFailure"   /> 
 47  </ global-exception-mappings >
         </ global-exception-mappings > 
 48  
 
 49  <!--  List of Users  -->
         <!--  List of Users  --> 
 50  < action  name ="users"  class ="userAction"  method ="list" >
         < action  name ="users"  class ="userAction"  method ="list" > 
 51  < result  name ="success" > userList.jsp </ result >
             < result  name ="success" > userList.jsp </ result > 
 52  < result  name ="input" > userList.jsp </ result >
             < result  name ="input" > userList.jsp </ result > 
 53  </ action >
         </ action > 
 54  
 
 55  <!--  Edit User  -->
         <!--  Edit User  --> 
 56  < action  name ="editUser"  class ="userAction"  method ="edit" >
         < action  name ="editUser"  class ="userAction"  method ="edit" > 
 57  < result  name ="success" > userForm.jsp </ result >
             < result  name ="success" > userForm.jsp </ result > 
 58  < result  name ="input" > userList.jsp </ result >
             < result  name ="input" > userList.jsp </ result > 
 59  </ action >
         </ action > 
 60  
 
 61  <!--  Save User  -->
         <!--  Save User  --> 
 62  < action  name ="saveUser"  class ="userAction" >
         < action  name ="saveUser"  class ="userAction" > 
 63  < result  name ="cancel"  type ="redirect" > users.html </ result >
             < result  name ="cancel"  type ="redirect" > users.html </ result > 
 64  < result  name ="delete"  type ="redirect" > users.html </ result >
             < result  name ="delete"  type ="redirect" > users.html </ result > 
 65  < result  name ="input" > userForm.jsp </ result >
             < result  name ="input" > userForm.jsp </ result > 
 66  < result  name ="success"  type ="chain" >
             < result  name ="success"  type ="chain" > 
 67  saveUserWithValidation
                saveUserWithValidation
 68  </ result >
             </ result > 
 69  </ action >
         </ action > 
 70  
 
 71  < action  name ="saveUserWithValidation"  class ="userAction"
         < action  name ="saveUserWithValidation"  class ="userAction" 
 72  method ="save" >
            method ="save" > 
 73  < result  name ="input" > userForm.jsp </ result >
             < result  name ="input" > userForm.jsp </ result > 
 74  < result  name ="success"  type ="redirect" > users.html </ result >
             < result  name ="success"  type ="redirect" > users.html </ result > 
 75  </ action >
         </ action > 
 76  
 
 77  <!--  List of Areas  -->
         <!--  List of Areas  --> 
 78  < action  name ="areas"  class ="areaAction"  method ="list" >
         < action  name ="areas"  class ="areaAction"  method ="list" > 
 79  < result  name ="success" > areaList.jsp </ result >
             < result  name ="success" > areaList.jsp </ result > 
 80  < result  name ="input" > areaList.jsp </ result >
             < result  name ="input" > areaList.jsp </ result > 
 81  </ action >
         </ action > 
 82  
 
 83  <!--  Edit Area  -->
         <!--  Edit Area  --> 
 84  < action  name ="editArea"  class ="areaAction"  method ="edit" >
         < action  name ="editArea"  class ="areaAction"  method ="edit" > 
 85  < result  name ="success" > areaForm.jsp </ result >
             < result  name ="success" > areaForm.jsp </ result > 
 86  < result  name ="input" > areaList.jsp </ result >
             < result  name ="input" > areaList.jsp </ result > 
 87  </ action >
         </ action > 
 88  
 
 89  <!--  Save Area  -->
         <!--  Save Area  --> 
 90  < action  name ="saveArea"  class ="areaAction" >
         < action  name ="saveArea"  class ="areaAction" > 
 91  < result  name ="cancel"  type ="redirect" > areas.html </ result >
             < result  name ="cancel"  type ="redirect" > areas.html </ result > 
 92  < result  name ="delete"  type ="redirect" > areas.html </ result >
             < result  name ="delete"  type ="redirect" > areas.html </ result > 
 93  < result  name ="input" > areaForm.jsp </ result >
             < result  name ="input" > areaForm.jsp </ result > 
 94  < result  name ="success"  type ="chain" >
             < result  name ="success"  type ="chain" > 
 95  saveAreaWithValidation
                saveAreaWithValidation
 96  </ result >
             </ result > 
 97  </ action >
         </ action > 
 98  
 
 99  < action  name ="saveAreaWithValidation"  class ="areaAction"
         < action  name ="saveAreaWithValidation"  class ="areaAction" 
100  method ="save" >
            method ="save" > 
101  < result  name ="input" > areaForm.jsp </ result >
             < result  name ="input" > areaForm.jsp </ result > 
102  < result  name ="success"  type ="redirect" > areas.html </ result >
             < result  name ="success"  type ="redirect" > areas.html </ result > 
103  </ action >
         </ action > 
104  
 
105  <!--  List of Games  -->
         <!--  List of Games  --> 
106  < action  name ="games"  class ="gameAction"  method ="list" >
         < action  name ="games"  class ="gameAction"  method ="list" > 
107  < result  name ="success" > gameList.jsp </ result >
             < result  name ="success" > gameList.jsp </ result > 
108  < result  name ="input" > gameList.jsp </ result >
             < result  name ="input" > gameList.jsp </ result > 
109  </ action >
         </ action > 
110  
 
111  <!--  Edit Game  -->
         <!--  Edit Game  --> 
112  < action  name ="editGame"  class ="gameAction"  method ="edit" >
         < action  name ="editGame"  class ="gameAction"  method ="edit" > 
113  < result  name ="success" > gameForm.jsp </ result >
             < result  name ="success" > gameForm.jsp </ result > 
114  < result  name ="input" > gameList.jsp </ result >
             < result  name ="input" > gameList.jsp </ result > 
115  </ action >
         </ action > 
116  
 
117  <!--  Save Game  -->
         <!--  Save Game  --> 
118  < action  name ="saveGame"  class ="gameAction" >
         < action  name ="saveGame"  class ="gameAction" > 
119  < result  name ="cancel"  type ="redirect" > games.html </ result >
             < result  name ="cancel"  type ="redirect" > games.html </ result > 
120  < result  name ="delete"  type ="redirect" > games.html </ result >
             < result  name ="delete"  type ="redirect" > games.html </ result > 
121  < result  name ="input" > gameForm.jsp </ result >
             < result  name ="input" > gameForm.jsp </ result > 
122  < result  name ="success"  type ="chain" >
             < result  name ="success"  type ="chain" > 
123  saveGameWithValidation
                saveGameWithValidation
124  </ result >
             </ result > 
125  </ action >
         </ action > 
126  
 
127  < action  name ="saveGameWithValidation"  class ="gameAction"
         < action  name ="saveGameWithValidation"  class ="gameAction" 
128  method ="save" >
            method ="save" > 
129  < result  name ="input" > gameForm.jsp </ result >
             < result  name ="input" > gameForm.jsp </ result > 
130  < result  name ="success"  type ="redirect" > games.html </ result >
             < result  name ="success"  type ="redirect" > games.html </ result > 
131  </ action >
         </ action > 
132  
 
133  <!--  List of Servers  -->
         <!--  List of Servers  --> 
134  < action  name ="servers"  class ="serverAction"  method ="list" >
         < action  name ="servers"  class ="serverAction"  method ="list" > 
135  < result  name ="success" > serverList.jsp </ result >
             < result  name ="success" > serverList.jsp </ result > 
136  < result  name ="input" > serverList.jsp </ result >
             < result  name ="input" > serverList.jsp </ result > 
137  </ action >
         </ action > 
138  
 
139  <!--  Edit Server  -->
         <!--  Edit Server  --> 
140  < action  name ="editServer"  class ="serverAction"  method ="edit" >
         < action  name ="editServer"  class ="serverAction"  method ="edit" > 
141  < result  name ="success" > serverForm.jsp </ result >
             < result  name ="success" > serverForm.jsp </ result > 
142  < result  name ="input" > serverList.jsp </ result >
             < result  name ="input" > serverList.jsp </ result > 
143  </ action >
         </ action > 
144  
 
145  <!--  Save Server  -->
         <!--  Save Server  --> 
146  < action  name ="saveServer"  class ="serverAction" >
         < action  name ="saveServer"  class ="serverAction" > 
147  < result  name ="cancel"  type ="redirect" > servers.html </ result >
             < result  name ="cancel"  type ="redirect" > servers.html </ result > 
148  < result  name ="delete"  type ="redirect" > servers.html </ result >
             < result  name ="delete"  type ="redirect" > servers.html </ result > 
149  < result  name ="input" > serverForm.jsp </ result >
             < result  name ="input" > serverForm.jsp </ result > 
150  < result  name ="success"  type ="chain" >
             < result  name ="success"  type ="chain" > 
151  saveServerWithValidation
                saveServerWithValidation
152  </ result >
             </ result > 
153  </ action >
         </ action > 
154  
 
155  < action  name ="saveServerWithValidation"  class ="serverAction"
         < action  name ="saveServerWithValidation"  class ="serverAction" 
156  method ="save" >
            method ="save" > 
157  < result  name ="input" > serverForm.jsp </ result >
             < result  name ="input" > serverForm.jsp </ result > 
158  < result  name ="success"  type ="redirect" > servers.html </ result >
             < result  name ="success"  type ="redirect" > servers.html </ result > 
159  </ action >
         </ action > 
160  
 
161  <!--  List of Players  -->
         <!--  List of Players  --> 
162  < action  name ="players"  class ="playerAction"  method ="list" >
         < action  name ="players"  class ="playerAction"  method ="list" > 
163  < result  name ="success" > playerList.jsp </ result >
             < result  name ="success" > playerList.jsp </ result > 
164  < result  name ="input" > playerList.jsp </ result >
             < result  name ="input" > playerList.jsp </ result > 
165  </ action >
         </ action > 
166  
 
167  <!--  Edit Player  -->
         <!--  Edit Player  --> 
168  < action  name ="editPlayer"  class ="playerAction"  method ="edit" >
         < action  name ="editPlayer"  class ="playerAction"  method ="edit" > 
169  < result  name ="success" > playerForm.jsp </ result >
             < result  name ="success" > playerForm.jsp </ result > 
170  < result  name ="input" > playerList.jsp </ result >
             < result  name ="input" > playerList.jsp </ result > 
171  </ action >
         </ action > 
172  
 
173  <!--  Save Player  -->
         <!--  Save Player  --> 
174  < action  name ="savePlayer"  class ="playerAction" >
         < action  name ="savePlayer"  class ="playerAction" > 
175  < result  name ="cancel"  type ="redirect" > players.html </ result >
             < result  name ="cancel"  type ="redirect" > players.html </ result > 
176  < result  name ="delete"  type ="redirect" > players.html </ result >
             < result  name ="delete"  type ="redirect" > players.html </ result > 
177  < result  name ="input" > playerForm.jsp </ result >
             < result  name ="input" > playerForm.jsp </ result > 
178  < result  name ="success"  type ="chain" >
             < result  name ="success"  type ="chain" > 
179  savePlayerWithValidation
                savePlayerWithValidation
180  </ result >
             </ result > 
181  </ action >
         </ action > 
182  
 
183  < action  name ="savePlayerWithValidation"  class ="playerAction"
         < action  name ="savePlayerWithValidation"  class ="playerAction" 
184  method ="save" >
            method ="save" > 
185  < result  name ="input" > playerForm.jsp </ result >
             < result  name ="input" > playerForm.jsp </ result > 
186  < result  name ="success"  type ="redirect" > players.html </ result >
             < result  name ="success"  type ="redirect" > players.html </ result > 
187  </ action >
         </ action > 
188  <!--  List of Sales  -->
         <!--  List of Sales  --> 
189  < action  name ="sales"  class ="saleAction"  method ="list" >
         < action  name ="sales"  class ="saleAction"  method ="list" > 
190  < result  name ="success" > saleList.jsp </ result >
             < result  name ="success" > saleList.jsp </ result > 
191  < result  name ="input" > saleList.jsp </ result >
             < result  name ="input" > saleList.jsp </ result > 
192  </ action >
         </ action > 
193  
 
194  <!--  Edit Sale  -->
         <!--  Edit Sale  --> 
195  < action  name ="editSale"  class ="saleAction"  method ="edit" >
         < action  name ="editSale"  class ="saleAction"  method ="edit" > 
196  < result  name ="success" > saleForm.jsp </ result >
             < result  name ="success" > saleForm.jsp </ result > 
197  < result  name ="input" > saleList.jsp </ result >
             < result  name ="input" > saleList.jsp </ result > 
198  </ action >
         </ action > 
199  
 
200  <!--  Save Sale  -->
         <!--  Save Sale  --> 
201  < action  name ="saveSale"  class ="saleAction" >
         < action  name ="saveSale"  class ="saleAction" > 
202  < result  name ="cancel"  type ="redirect" > sales.html </ result >
             < result  name ="cancel"  type ="redirect" > sales.html </ result > 
203  < result  name ="delete"  type ="redirect" > sales.html </ result >
             < result  name ="delete"  type ="redirect" > sales.html </ result > 
204  < result  name ="input" > saleForm.jsp </ result >
             < result  name ="input" > saleForm.jsp </ result > 
205  < result  name ="success"  type ="chain" >
             < result  name ="success"  type ="chain" > 
206  saveSaleWithValidation
                saveSaleWithValidation
207  </ result >
             </ result > 
208  </ action >
         </ action > 
209  
 
210  < action  name ="saveSaleWithValidation"  class ="saleAction"
         < action  name ="saveSaleWithValidation"  class ="saleAction" 
211  method ="save" >
            method ="save" > 
212  < result  name ="input" > saleForm.jsp </ result >
             < result  name ="input" > saleForm.jsp </ result > 
213  < result  name ="success"  type ="redirect" > sales.html </ result >
             < result  name ="success"  type ="redirect" > sales.html </ result > 
214  </ action >
         </ action > 
215  
 
216  </ package >
     </ package > 
217  </ xwork >
 </ xwork > 
完整代码:
http://download.csdn.net/source/257861
	posted on 2007-02-15 11:07 
zhangjingqiang 阅读(689) 
评论(0)  编辑  收藏  所属分类: 
Spring 、
WebWork 、
iBATIS