ssh框架

来源:互联网 发布:淘宝店招图片大全免费 编辑:程序博客网 时间:2024/05/11 18:42

ssh( Spring/ Struts/ Hibernate) 集成

1.导入各个框架所需的包后,配置配置文件。

在Struts配置文件中加:

      ......

     <plug-in  className="org.springframework.web.struts.ContextLoaderPlugIn">
              <set-property property="contextConfigLocation" value="classpath:applicationContext.xml" />
     </plug-in>
</struts-config>

2.将Spring配置文件中报错的行改为:

class=“org.springframework.jdbc.datasource.DriverManagerDataSource”    (或者到官方网站下载相应的jar包)

3.配置过滤器,防止乱码

注:还有一些小问题,在这里就不细说了。