posts - 64,  comments - 9,  trackbacks - 0

          web.xml配置

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
               http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
              <filter>
                  <filter-name>struts-cleanup</filter-name>
                  <filter-class>
                       org.apache.struts2.dispatcher.ActionContextCleanUp
                  </filter-class>
              </filter>
              <filter-mapping>
                  <filter-name>struts-cleanup</filter-name>
                  <url-pattern>/*</url-pattern>
              </filter-mapping>
              <filter>
                  <filter-name>struts2</filter-name>
                  <filter-class>
                       org.apache.struts2.dispatcher.FilterDispatcher
                  </filter-class>
              </filter>

              <filter-mapping>
                  <filter-name>struts2</filter-name>
                  <url-pattern>/*</url-pattern>
              </filter-mapping>

              <listener>
                  <listener-class>
                       org.springframework.web.context.ContextLoaderListener
                  </listener-class>
              </listener>
              <context-param>
                  <param-name>contextConfigLocation</param-name>
                  <param-value>
                       classpath:applicationContext.xml,classpath:applicationContext-extend.xml
                  </param-value>
              </context-param>
              <welcome-file-list>
                  <welcome-file>index.jsp</welcome-file>
              </welcome-file-list>
          </web-app>

           

           

          struts.properties

          1 struts.objectFactory=spring
          2 struts.objectFactory.spring.autoWire=auto

           

           

          applicationContext.xml

          01      <!-- 配置ibatis -->
          02     <bean id="sqlMapClient"
          03         class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
          04         <property name="configLocation">
          05             <value>classpath:SqlMapConfig.xml</value>
          06         </property>
          07         <property name="dataSource">
          08             <ref bean="dataSource" />
          09         </property>
          10     </bean>
          1      <!-- 配置DAO -->
          2     <bean id="AdminDAO" class="cn.edu.hit.mis.dao.AdminDAOImpl">
          3         <property name="sqlMapClient">
          4             <ref bean="sqlMapClient" />
          5         </property>
          6     </bean>
          其他地方都一樣
          posted on 2009-10-13 17:51 super_nini 閱讀(734) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2009年10月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          相冊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 安阳市| 托克托县| 长葛市| 阳泉市| 塘沽区| 揭东县| 宁蒗| 闵行区| 雷波县| 斗六市| 江西省| 上饶县| 兰考县| 景洪市| 田林县| 连平县| 阳山县| 宜春市| 灵丘县| 噶尔县| 普格县| 龙泉市| 巴楚县| 聂拉木县| 西安市| 邹平县| 车险| 禹州市| 镇原县| 仙居县| 信宜市| 邮箱| 桂阳县| 叶城县| 巴林右旗| 樟树市| 安丘市| 会东县| 镇远县| 丰宁| 卢龙县|