亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

type Status report message /login/login_success.jsp description The requested resource is not available. Apache Tomcat/7.0.72

<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

<%

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

? <head>

? ? <base href="<%=basePath%>">

? ??

? ? <title>My JSP 'login.jsp' starting page</title>

? ??

<meta http-equiv="pragma" content="no-cache">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="0"> ? ?

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

<!--

<link rel="stylesheet" type="text/css" href="styles.css">

-->


? </head>

??

? <body>

? <div>

? <form action="logindo.jsp" method="post">

? <label>用戶:</label>

? <input name="username" value=""/>

? <label>密碼:</label>

? <input type="password" name="password"/>

? <input type="submit" value="登錄"/>

??

? </form>

??

? </div>

? </body>

</html>




<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

<%

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";


request.setCharacterEncoding("utf-8");

String name="";

name=request.getParameter("username");

String password="";

password=request.getParameter("password");

if("admin".equals(name)&&"admin".equals(password)){

session.setAttribute("name",name);

request.getRequestDispatcher("login_success.jsp").forward(request,response);

}else{

response.sendRedirect("login_failure.jsp");


}

%>




<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

<%

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

? <head>

? ? <base href="<%=basePath%>">

? ??

? ? <title>My JSP 'login.jsp' starting page</title>

? ??

<meta http-equiv="pragma" content="no-cache">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="0"> ? ?

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

<!--

<link rel="stylesheet" type="text/css" href="styles.css">

-->


? </head>

??

? <body>

??

?<%?

?String name="";

?if(session.getAttribute("name")!=null){

?name=session.getAttribute("name").toString();

?}

?%>

? 歡迎<font color="red"><%=name %></font>,登錄成功!

?

??

? </body>

</html>


正在回答

1 回答

看一下login_success.jsp的名字對不對,路徑好像有問題

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

type Status report message /login/login_success.jsp description The requested resource is not available. Apache Tomcat/7.0.72

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號