hly920419 2015-12-05 13:43 采纳率: 50%
浏览 1552
已采纳

struts2中action的路径问题

页面:

<form action="<%=basePath%>zy?cou_id=1" method="post">
<input type="submit" value="开始学习" class="ss" style="line-height:40px; font-size:26px; margin-left:20%; background-color:#0F9;"  />
</form>

配置:

<struts><package name="stu"  extends="struts-default" name="/">
<action name="zy" class="el.com.web.action.stu.StudentAction" method="findCourse">
<result name="success">student/OEStudent/stu_zy.jsp</result></action>
</package> 
</struts>

问题:
HTTP Status 404 - There is no Action mapped for namespace [/] and action name [zy] associated with context path [/e-Learning].

  • 写回答

3条回答 默认 最新

  • xuanzheqian 2015-12-05 15:24
    关注

    为什么会有两个name呢 。。“/” namespace 默认的命名空间就是“/”。你看看你的basepath 与访问的地址匹配

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?