|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
三个文件的代码分别为:
login.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="server.jsp" method="post">
<table>
<tr>
<tb>姓名:<input type="text" name="name"/></tb><br>
<tb>密码:<input type="password" name="passwd"/></tb><br>
</tr>
<tr>
<input type="submit" value="提交">
</tr>
</table>
</form>
</body>
</html>
server.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="server.jsp" method="post">
<table>
<tr>
<tb>姓名:<input type="text" name="name"/></tb><br>
<tb>密码:<input type="password" name="passwd"/></tb><br>
</tr>
<tr>
<input type="submit" value="提交">
</tr>
</table>
</form>
</body>
</html>
loginSuccess.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<% String name=(String)session.getAttribute("name").toString();
%>
欢迎<%=name%>
</body>
</html>
最后一步出现:
HTTP Status 404 – Not Found
Type Status Report
Message /%E5%86%85%E7%BD%AE%E5%87%BD%E6%95%B0/%E4%BD%9C%E4%B8%9A/loginSuccsess.jsp
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
|
-
最后出现这个错误
|