There is no Action mapped for namespace [/] and action name [login] associate解决办法 .
写了一个JSP项目,在配置struts2时遇到了这个错误,在网上逛了一大圈后终于解决了这个问题。具体解决方法是:
1、struts.xml的名字和位置
这里特别提一点,很多人遇到这个错误都是名字错误,比如写成struts-login.xml但又没在web.xml中进行相关配置。struts.xml是struts2的默认配置名字所以不用再web.xml中配置。 第二点是位置问题,很多人说是放在src根目录下,其实不然,在部署后的web项目中是没有这个目录的试问struts2又怎么访问这个配置文件?正确的是放在WEB-INF/classes目录下,有些用myeclipse的朋友可能会说:“怎么我放在src目录下还是能运行呢?”这是因为IDE在部署项目时将struts.xml自动拷贝到了WEB-INF/classes下。我就是自己用ant完成这个拷贝步骤的。
2、Form表单
在表单中设置属性时如果使用的不是默认命名空间一定要声明。
3、struts.xml内容
一定要确认action的name属性填写无误,其实在一般的小型项目中使用默认命名空间就够了,不用设置namespace属性。此外一定要确认classes目录下有相应action的class类文件。
There is no Action mapped for namespace [/] and action name [login] associate解决办法 .的更多相关文章
- struts2中错误There is no Action mapped for namespace [/] and action name [] associated with context path
1 There is no Action mapped for namespace [/] and action name [] associated with context path [/Stru ...
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
今天在调试一个基础的Struts2框架小程序.总是提示"There is no Action mapped for namespace / and action name"的错误. ...
- 报错:HTTP Status 404 - There is no Action mapped for namespace [/] and action name [product-save] associated with context path [/20161101-struts2-2].
运行:index.jsp---->input.jsp----->details.jsp,但是在input.jsp到details.jsp的时候报错误. 异常如下: 严重: Could no ...
- Struts2-tomcat报错:There is no Action mapped for namespace / and action
HTTP Status 404 - There is no Action mapped for namespace / and action name first. type Status repor ...
- There is no Action mapped for namespace [/pages/action/student] and action name [findStudent]
1.错误描写叙述 2014-7-13 2:38:54 org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one ...
- There is no Action mapped for namespace / and action name UserAction
果断收藏了,说的非常具体.刚開始学习的人常常遇到的问题. There is no Action mapped for namespace / and action name UserAction 在网 ...
- eclipse中配置struts2出现There is no Action mapped for namespace [/] and action name [Login] associated wi
下午在eclipse中配置struts2时报: There is no Action mapped for namespace [/] and action name [Login] associat ...
- eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with context path错误
eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with conte ...
- struts 2.5 There is no Action mapped for namespace [/] and action name [user_find] associated with context path [/struts2_crm].
遇到了这个错误. There is no Action mapped for namespace [/] and action name [user_find] associated with con ...
- Could not find action or result: There is no Action mapped for namespace [/] and action name [GetG
Could not find action or result: /car/GetGpsDataAction There is no Action mapped for namespace [/] ...
随机推荐
- 2018-11-3-WPF-内部的5个窗口之-MediaContextNotificationWindow
title author date CreateTime categories WPF 内部的5个窗口之 MediaContextNotificationWindow lindexi 2018-11- ...
- [转]embedding technic:从SNE到t-SNE再到LargeVis
http://bindog.github.io/blog/2016/06/04/from-sne-to-tsne-to-largevis/#top
- poj 1085 Triangle War (状压+记忆化搜索)
Triangle War Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2685 Accepted: 1061 Desc ...
- 冒泡排序 Day07
package com.sxt.arraytest2; /* * 冒泡排序 * 思想:两两交换 一路大的向右 */ import java.util.Arrays; public class Bubb ...
- 基本的Sql编写注意事项
基本的Sql编写注意事项 尽量少用IN操作符,基本上所有的IN操作符都可以用EXISTS代替. 不用NOT IN操作符,可以用NOT EXISTS或者外连接+替代. Oracle在执行IN子查询时,首 ...
- 2018-8-10-WPF-轻量级-MVVM-框架入门-2.1.2
title author date CreateTime categories WPF 轻量级 MVVM 框架入门 2.1.2 lindexi 2018-08-10 19:16:51 +0800 20 ...
- jmeter循环取消今天所有的订单
结构 1.首先,添加JDBC Connection Configuration 2.其次添加JDBC request 添加循环控制器 循环控制器下方添加计数器 ${__V(reservationID_ ...
- GP-荧光免疫分析仪SDK 协议
近期,闲来无事,得到一款GP的poct设备研究了下,该设备型号:Getein1100 ,串口进行通信,但是串口连接有所限制,于是找到一款数传模块,将串口转网口,使用pc进行通信抓包分析,如下: 在此可 ...
- oracle函数 months_between(d1,d2)
[功能]:返回日期d1到日期d2之间的月数. [参数]:d1,d2 日期型 [返回]:数字 如果d1>d2,则返回正数 如果d1<d2,则返回负数 [示例] select sysdate, ...
- Redis源码解析:03字典
字典是一种用于保存键值对(key value pair)的抽象数据结构.在字典中,一个键和一个值进行关联,就是所谓的键值对.字典中的每个键都是独一无二的,可以根据键查找.更新值,或者删除整个键值对等等 ...