各文件的相应代码:helpRight.ftl文件:
<div class="title"><a href="/noticeAndTopicList.do">更多>></a>公告</div>struts-web.xml文件:<package name="web" extends="struts-tourhb" namespace="/">
    <action name="noticeAndTopicList" class="web.EmptyAction">
        <result name="success" type="freeer">/WEB-INF/template${theme}/web/noticeAndTopicList.ftl</result>
    </action>
</package>spring-action.xml文件:<bean id="web.EmptyAction" class="com.tourhb.action.web.EmptyAction" singleton="false"/>这个bean标签本来就存在的,而且可以被调用成功,但是为什么新建了一个action以后再调用这个bean就报错了?错误如下:There is no Action mapped for namespace / and action name noticeAndTopicList. - [unknown location]

解决方案 »

  1.   

    是不是那个helpRight.ftl里的href那儿多了个“/” ,改成
    <div class="title"><a href="noticeAndTopicList.do">更多>></a>公告</div>看看
      

  2.   

    好像不行诶,另外helpright.ftl和noticeAndTopicList是在同一文件夹下
      

  3.   

    我看了tomcat里的这个struts-web文件怎么还是没有这条action呢?保存了还是不行吗?
      

  4.   

    清下tomcat的缓存,重部署试试