【发布时间】:2013-05-07 02:23:27
【问题描述】:
我有一个具有以下目录结构的 Struts 2 项目。但是当我尝试在 Tomcat 7 上使用 Eclipse 运行这个项目时,它给了我 404 错误。
Struts.xml:
<?xml version="1.0" encoding="UTF-8"?>
<struts>
<action name="login" class="com.actions.LoginAction" method="execute">
<result name="success">/jsp/login.jsp</result>
</action>
</struts>
login.jsp:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login Page</title>
</head>
<body>
<s:form action="login" method="post">
Login name : <input type="text" value="name"/>
</s:form>
</body>
</html>
在路径 http://localhost:8080/StrutsPro/jsp/login.jsp 上运行时,它给出了 HTTP 404,为什么?
【问题讨论】:
标签: java struts2 struts http-status-code-404 web-project