哪位大侠有ssh框架的搭建视频请给我一份~
万分感谢~

解决方案 »

  1.   

    ssh框架
    我在baidu视频里搜得
    http://www.56.com/u22/v_Mzk3OTI3MzE.html
      

  2.   

    我有s2sh的搭建视频  ,如需要加qq:410884685
      

  3.   

    一: 新建一web项目(score2)
    二:添加spring功能,选择如下lib:
            spring2 core
            spring2 persistence core
            spring2 aop
            spring2 persistence jdbc
           spring2  web
           spring2  testing
           hibernate3.2 core
    三:添加hibernate功能
            sessionFactory id:sessionFactory
            datasource id:      dataSource
        (注意:添加common-pool.jar,去掉spring aop中asm-2.2.3.jar)
          通过向导已经在app.xml中配置了一个id为sessionFactory的  bean,这时候,在配置上,
          已经完成了spring和hibernate的集成
          
            show_sql:<prop key="hibernate.show_sql">true</prop>
           指定hbm文件所在路径:
                          <property name="mappingDirectoryLocations">
       <list>
        <value>classpath:com/model</value>
       </list>
           </property>四:添加struts功能五:web启动的时候,自动启动spring
           在web.xml中添加如下信息
           <1>:配置contextConfigLocation参数,指定spring配置文件的位置
           <context-param>
              <param-name>contextConfigLocation</param-name>
             <param-value>classpath:app.xml</param-value>
          </context-param>
          <2>:配置一监听器,启动spring
         <listener>
           <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>六:struts和spring的集成:所谓spring和struts的集成,是指将struts的action托管给spring,
          也是指把struts的action交给spring管理,由spring完成action的依赖注入等工作
           <controller>
    <set-property            property="processorClass"  value="org.springframework.web.struts.AutowiringRequestProcessor" />
         </controller>
       <message-resources parameter="ApplicationResources" />七:放一个log4j.properties 到src
    八: 配置openSesisonInView过滤器
            <!-- spring提供的用来实现hibernate的opensessionInview的过滤器 -->
    <filter>
    <filter-name>openSessionInView</filter-name>
    <filter-class>
    org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
    </filter-class>
    <!-- 通过这个参数指定打开session所用到的session工厂的名字,
    如果session工厂的名字为“sessionFactory”,此参数可以不用指定
    -->
    <init-param>
    <param-name>sessionFactoryBeanName</param-name>
    <param-value>sessionFactory</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>openSessionInView</filter-name>
    <url-pattern>*.do</url-pattern>
    </filter-mapping>九:配置字符编码过滤器
          <!-- spring提供的用來統一編碼的 filter-->
    <filter>
    <filter-name>characterEncoding</filter-name>
    <filter-class>
    org.springframework.web.filter.CharacterEncodingFilter
    </filter-class>
    <init-param>
                                      <!-- 使用utf-8编码 -->
    <param-name>encoding</param-name>
    <param-value>utf-8</param-value>
    </init-param>
    <init-param>
                                           <!-- 强制使用-->
    <param-name>forceEncoding</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>characterEncoding</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    十:配置xdoclet十一:使用sitemesh做布局
             1、sitemesh.jar
              2、web.xml添加过滤器
                     <filter>
    <filter-name>sitemesh</filter-name>
    <filter-class>
    com.opensymphony.module.sitemesh.filter.PageFilter
    </filter-class>
    </filter>
    <filter-mapping>
    <filter-name>sitemesh</filter-name>
    <url-pattern>*.do</url-pattern>
    </filter-mapping>
           3、模板文件放到decorators文件夹
          4、WEB-INF下的decorators.xml
    十二:AJAX: dwr的配置
            1.   dwr.jar
            2、dwr的servlet
               
                  <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <servlet-class>
    org.directwebremoting.servlet.DwrServlet
    </servlet-class> <!-- This should NEVER be present in live -->
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet> <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>

    3、web-inf/dwr.xml
    十三:  配置spring的聲明式事務處理
               1、在app.xml中添加tx命名空間
              2、<tx:annotation-driven transaction-manager="transactionManager" />
    <bean id="transactionManager"
                    class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory" />
    </bean>十四:使用scope为session或request的bean
             1、 <!-- 可以使用scope 为request或session的bean -->
    <listener>
    <listener-class>                   org.springframework.web.context.request.RequestContextListener
    </listener-class>
    </listener>      2、
    <bean id="pageHolder"
    class="org.springframework.beans.support.PagedListHolder" scope="session">
    <property name="pageSize" value="5" />
    <property name="maxLinkedPages" value="5" />
                      <!--做一个代理来匹配长生命周期的对象  -->
    <aop:scoped-proxy/>
    </bean>
      

  4.   

    看视频纯粹是浪费时间。自己动手做吧,
    其实现在的框架组合有中SSH向VSSI的转变。