栏目分类
热门排行
最近更新
关于网友提出的“ HTTP Status 404 - There is no Action mapped for namespace / and action name logi”问题疑问,本网通过在网上对“ HTTP Status 404 - There is no Action mapped for namespace / and action name logi”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
错误提示:HTTP Status 404 - There is no Action mapped for namespace / and action name login. type Status report message There is no Action mapped for namespace / and action name login. description The requested resource (There is no Action mapped for namespace / and action name login.) is not available. -------------------------------------------------------------------------------- Apache Tomcat/6.0.20 下面上代码: web.xml re index.html index.htm index.jsp default.html default.htm default.jsp struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* struts.xml "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> /success.jsp /fail.jsp loginAction.java package example; public class loginAction { private String usename; private String password; public void setPassword(String password) { this.password = password; } public String getPassword() { return password; } public void setUsename(String usename) { this.usename = usename; } public String getUsename() { return usename; } public String execute() throws Exception{ if(getUsename().equals("admin")&&getPassword().equals("pass")){ return "success"; } else{ return "fail"; } } } index.jsp <%@ page language="java" c/> 密码: