码迷,mamicode.com
首页 > Web开发 > 详细

SSH网站构建基本方法

时间:2017-01-08 16:28:33      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:打开   config   namespace   soc   jar   ati   color   with   list   

 

1.添加struts2.1。Struts2核心库。

2.编写jsp页面添加action,struts.xml添加映射。

3.运行测试。

4.添加spring3.0。Spring 3.0 Core Lib、Spring 3.0 Web Lib。

打开配置文件Web.xml,添加如下配置行。

<!-- Spring 配置和监听start -->

  <context-param>

    <param-name>contextConfigLocation</param-name>

    <param-value>/WEB-INF/classes/application*.xml</param-value>

  </context-param>

  <listener>

    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

  </listener>

<!-- end -->

5.添加引用Struts2 Spring Libraries。

6.根据控制台提示添加各种jar包到lib。

7.ApplicationContext.xml添加映射,struts.xml修改映射。

  1)出现There is no Action mapped for namespace [/] and action name [Login] associated with context path [/eprint]错误

    检查struts.xml和applicationContext.xml;

    确保在WEB-INF下才是classes中的struts.xml文件与src下的struts.xml一致

 

SSH网站构建基本方法

标签:打开   config   namespace   soc   jar   ati   color   with   list   

原文地址:http://www.cnblogs.com/GoOnTheWestBuilding/p/6256767.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!