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

Struts2中关于"There is no Action mapped for namespace / and action name"的总结

时间:2017-04-10 15:21:00      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:可能性   map   2.0   round   encoding   dtd   页面   示例   成功   

请求页面时出现这种情况的可能性有三种:

  1,struts.xml文件名错误。一定要注意拼写问题;

  2,struts.xml文件放置路径错误。一定要将此文件放置在src目录下。编译成功后,要确认是否编译到classes目录中;

  3,struts.xml文件名与文件内容不一致 (正确示例如下)

 

  例:struts.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>




</struts>

 

Struts2中关于"There is no Action mapped for namespace / and action name"的总结

标签:可能性   map   2.0   round   encoding   dtd   页面   示例   成功   

原文地址:http://www.cnblogs.com/brucexl/p/6688553.html

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