Could not find action or result There is no Action mapped for namespace / an
问题描述:
Could not find action or result There is no Action mapped for namespace / an
错误:Could not find action or result
There is no Action mapped for namespace / and action name user_del.
struts.xml:
/add.jsp
/del.jsp
LoginAction.java:
public class LoginAction extends ActionSupport {
\x05public String add(){
\x05\x05return"add";
\x05}
\x05public String del(){
\x05\x05return"del";
\x05
}
}
index.jsp:
添加
删除
答
LoginAction类中del方法中应该这样写:return "user_del",或者struts.xml中的 /del.jsp
改成 /del.jsp