webwork.properties
?
# extension for actions
webwork.action.extension=action
# spring integration
webwork.objectFactory=spring
webwork.objectFactory.spring.autoWire=type
?
web.xml
?
?<context-param>
??<param-name>contextConfigLocation</param-name>
??<param-value>/WEB-INF/applicationContext.xml</param-value>
?</context-param>
?<listener>
??<listener-class>
???org.springframework.web.context.ContextLoaderListener
??</listener-class>
?</listener>
?
?<servlet>
??<servlet-name>webwork</servlet-name>
??<servlet-class>
???com.opensymphony.webwork.dispatcher.ServletDispatcher
??</servlet-class>
?</servlet>
?<servlet-mapping>
??<servlet-name>webwork</servlet-name>
??<url-pattern>*.action</url-pattern>
?</servlet-mapping>
?
applicationContext.xml
?
?
?<bean id="myDataSource"
??class="org.springframework.jndi.JndiObjectFactoryBean">
??<property name="jndiName">
???<value>java:comp/env/webglDS</value>
??</property>
?</bean>
?<bean id="sqlMapClient"
??class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
??<property name="configLocation"
???value="/WEB-INF/SqlMapConfig.xml" />
??<property name="dataSource" ref="myDataSource" />
?</bean>
?
?<bean id="baseDao" class="com.ufgov.adpm.dao.impl.OracleDao">
??<property name="sqlMapClient" ref="sqlMapClient" />
?</bean>
?<bean id="accountInfoService" class="com.ufgov.adpm.service.impl.AccountInfoServiceImpl">
??<property name="baseDao" ref="baseDao"></property>
?</bean>
?
?<bean id="accountInfoAction" class="com.ufgov.adpm.action.AccountInfoAction">
??<property name="accountInfoService" ref="accountInfoService"></property>
?</bean>
?
?
SqlMapConfig.xml
?
<sqlMapConfig>
?<settings cacheModelsEnabled="false" enhancementEnabled="true"
??lazyLoadingEnabled="false" errorTracingEnabled="true"
??useStatementNamespaces="true" />
??
?<typeHandler jdbcType="CLOB" javaType="java.lang.String"
??callback="org.springframework.orm.ibatis.support.ClobStringTypeHandler" />
??
?<sqlMap resource="sqlmap/adpm-listPage.xml" />
?
</sqlMapConfig>
?
?
adpm-listPage.xml
?
<sqlMap namespace="adpm-listPage">
?<select id="getAccountInfoFromADPM_CPA_INFO" resultClass="com.ufgov.adpm.model.AccountInfo" parameterClass="map">
??SELECT * FROM ADPM_CPA_INFO T
??<dynamic prepend="WHERE">
???<isNotNull prepend="AND" property="ID_NUM">
????T.ID_NUM=#ID_NUM#
???</isNotNull>
???<isNotNull prepend="AND" property="NAME">
????T.NAME=#NAME#
???</isNotNull>
??</dynamic>
?</select>
</sqlMap>