关于这个问题There is no Action mapped for namespace / and action name login.的处理

关于这个问题There is no Action mapped for namespace / and action name login.的解决份两个步骤:

1.-----首先查看你的struts.xml 文件是否在src目录下;

2.-----检查struts.xml文件的语法是否正确:

               如果1正确的话那就一定是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>
 <package name="struts2" extends="struts-default">
 
  <action name="login" class="com.test.action.LoginAction">
  <result name="success">/result.jsp</result>
  </action>
 </package>
</struts>   
          那么就只有是红字的部分写错了 查看你的是否吧struts-default中间的“-”错写成了struts=default;

          大家试试看能否给大家解决问题;

 

 

posted @ 2008-09-29 21:49  DC  阅读(12334)  评论(5编辑  收藏  举报