快速搭建ssh(最终版)

一个月又忘了。还是做个笔记。自己看下就能想起来。。。

1.在MyEclipse中新建web Project

2.首先整合struts

2.然后整合spring

然后在web.xml中添加路径和监听

 <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
  </context-param>
  <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

运行项目,可以跑起来,页面可以显示This is my JSP page.说明成功,接下来就是配置hibernate了

3.整合hibernate

数据库连接还有另外一种方式,就是在window-->show view -->other --> DB Browser 就可以创建连接数据库了。

 

posted @ 2016-01-02 13:57  夏末、初秋  阅读(285)  评论(0编辑  收藏  举报