struts2 的文件路径找不到!报404错误!!!求大神帮忙!!
login.jsp----------<%@pagelanguage="java"contentType="text/html;charset=GBK"pageEncod...
login.jsp----------
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="loginPage"/></title>
</head>
<body>
<s:form action="login">
<s:textfield name="username" key="user"/>
<s:textfield name="password" key="pass"/>
<s:submit key="login"/>
</s:form>
</body>
</html>
welcome.jsp--------------
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
欢迎登陆!
</body>
</html>
为什么welcome.jsp能正常的显示,而login.jsp却报错!
type Status report
message /Struts2Demo/login.jsp
description The requested resource (/Struts2Demo/login.jsp) is not available.
web.xml-------------
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> 展开
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="loginPage"/></title>
</head>
<body>
<s:form action="login">
<s:textfield name="username" key="user"/>
<s:textfield name="password" key="pass"/>
<s:submit key="login"/>
</s:form>
</body>
</html>
welcome.jsp--------------
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
欢迎登陆!
</body>
</html>
为什么welcome.jsp能正常的显示,而login.jsp却报错!
type Status report
message /Struts2Demo/login.jsp
description The requested resource (/Struts2Demo/login.jsp) is not available.
web.xml-------------
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> 展开
2个回答
展开全部
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
快又稳
2024-10-28 广告
2024-10-28 广告
Apache基于域名的虚拟主机配置主要涉及到在Apache配置文件中为不同域名指定不同的网站目录和日志路径。配置时,需确保域名已正确指向服务器的IP地址。在Apache的`httpd-vhosts.conf`或类似配置文件中,为每个域名创建...
点击进入详情页
本回答由快又稳提供
展开全部
login.jsp和welcome.jsp在同一文件夹下吗
更多追问追答
追问
是的,都在WebContent下面!
追答
struts.xml中action配置了吗
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询