applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
- Application context definition for "springapp" DispatcherServlet.
-->
<beans default-autowire="autodetect">
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://192.168.0.119:3306/portal</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value>chinalions</value>
</property>
</bean>
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation"
value="classpath:com/test/persistence/Config.xml"/>
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="sqlMapClientTemplate"
class="org.springframework.orm.ibatis.SqlMapClientTemplate">
<property name="sqlMapClient" ref="sqlMapClient"/>
</bean>
<bean id="bookDao" class="com.test.persistence.dao.impl.BookDao">
<property name="sqlMapClientTemplate" ref="sqlMapClientTemplate"/>
</bean>
<bean id="bookManager" class="com.test.logic.business.BookManager">
<property name="bookDao" ref="bookDao"/>
</bean>
<bean id="bookService" class="com.test.logic.service.BookService">
<property name="bookManager" ref="bookManager"/>
</bean>
<!-- /*** Edit ***/ -->
<bean id="delProcess" singleton="false"
class="com.test.action.edit.DelEditProcessAction">
<property name="bookService" ref="bookService"/>
</bean>
<bean id="find" singleton="false"
class="com.test.action.edit.FindEditAction">
</bean>
<bean id="findProcess" singleton="false"
class="com.test.action.edit.FindEditProcessAction">
<property name="bookService" ref="bookService"/>
</bean>
<bean id="indexEdit" singleton="false"
class="com.test.action.edit.IndexEditAction">
<property name="bookService" ref="bookService"/>
</bean>
<bean id="editProcess" singleton="false"
class="com.test.action.edit.IndexEditProcessAction">
<property name="bookService" ref="bookService"/>
</bean>
<!-- /*** Help ***/ -->
<bean id="indexHelp" singleton="false"
class="com.test.action.help.IndexHelpAction">
</bean>
<!-- /*** View ***/ -->
<bean id="index" singleton="false"
class="com.test.action.view.IndexViewProcessAction">
<property name="pageManager" ref="pageManager"/>
</bean>
<bean id="chartProcess" singleton="false"
class="com.test.action.view.chart.IndexChartProcessAction">
<property name="bookService" ref="bookService"/>
</bean>
<!-- /*** Drools ***/ -->
<bean id="indexDrools" singleton="false"
class="com.test.action.view.drools.IndexDroolsAction">
</bean>
<bean id="droolsProcess" singleton="false"
class="com.test.action.view.drools.IndexDroolsProcessAction">
<property name="drools" ref="drools"/>
</bean>
<bean id="fiatProcess" singleton="false"
class="com.test.action.view.fiat.FiatViewProcessAction">
<property name="bookService" ref="bookService"/>
</bean>
<bean id="indexFree" singleton="false"
class="com.test.action.view.free.IndexFreeAction">
</bean>
<bean id="freeProcess" singleton="false"
class="com.test.action.view.free.IndexFreeProcessAction">
</bean>
<bean id="indexUpload" singleton="false"
class="com.test.action.view.upload.UploadViewAction">
</bean>
<bean id="uploadProcess" singleton="false"
class="com.test.action.view.upload.UploadViewProcessAction">
</bean>
<!-- /*** Drools ***/ -->
<bean id="packageFactory" singleton="true"
class="com.test.drools.PackageFactory">
</bean>
<bean id="drools" singleton="false"
class="com.test.drools.Drools">
<property name="packageFactory" ref="packageFactory"/>
<property name="location" value="HelloWorld.drl"/>
</bean>
<!-- /*** Page ***/ -->
<bean id="page" singleton="true"
class="com.test.page.Page">
</bean>
<bean id="pageResult" singleton="false"
class="com.test.page.PageResult">
<property name="bookDao" ref="bookDao"/>
</bean>
<bean id="pageManager" singleton="true"
class="com.test.page.PageManager">
<property name="page" ref="page"/>
<property name="pageResult" ref="pageResult"/>
</bean>
</beans>
dwr.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
"http://www.getahead.ltd.uk/dwr/dwr10.dtd">
<dwr>
<allow>
<create creator="new" javascript="validator">
<param name="class" value="org.apache.struts2.validators.DWRValidator"/>
</create>
<convert converter="bean" match="com.opensymphony.xwork2.ValidationAwareSupport"/>
</allow>
<signatures>
<![CDATA[
import java.util.Map;
import org.apache.struts2.validators.DWRValidator;
DWRValidator.doPost(String, String, Map<String, String>);
]]>
</signatures>
</dwr>
jboss-app.xml
<jboss-app>
<app-name>struts-portlet</app-name>
</jboss-app>
jboss-portlet.xml
<portlet-app>
<portlet>
<portlet-name>StrutsPortlet</portlet-name>
<security>
</security>
</portlet>
</portlet-app>
jboss-web.xml
<?xml version="1.0"?>
<jboss-web>
</jboss-web>