Requirement description

Realize the login and authentication function of enterprise mailbox

User through JSP Page enter user name and password

If the user name is lucky, Password is 123456, Display on the welcome page “ Hello :lucky!”

If the authentication login fails , Then return to the login page to log in again

 
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%> <!DOCTYPE html> <html> <head> <meta charset="utf-8">
<title> Mailbox login verification </title> </head> <body> <form action="process.jsp" method="post">
<table> <tr> <td align="right"> user name :</td> <td><input type="text" name="u_name"
/></td> </tr> <tr> <td align="right"> password :</td> <td><input type="password"
name="u_pswd" /></td> </tr> <tr> <td><input type="submit" value=" Submit " /></td>
</tr> </table> </form> </body> </html> <%@ page language="java"
contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html>
<html> <head> <meta charset="utf-8"> <title> Validation processing page </title> </head> <body> <%
String name=request.getParameter("u_name"); String
pswd=request.getParameter("u_pswd"); if(name.equals("lucky") &&
pswd.equals("123456")){ out.print(" Hello ,"+name+"!");
request.getRequestDispatcher("success.jsp").forward(request, response); }else{
response.sendRedirect("Login.jsp"); } %> </body> </html> <%@ page
language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Verification success page </title>
</head> <body> <h1> Verification successful !</h1> <h2> Hello , <% String
name=request.getParameter("u_name"); out.print(name); %> </h2> </body> </html>
 

Technology
©2019-2020 Toolsou All rights reserved,
java Four functional interfaces ( a key , simple ) It's unexpected Python Cherry tree (turtle The gorgeous style of Library ) Browser kernel ( understand )HashMap Explain in detail Some East 14 Pay change 16 salary , Sincerity or routine ?html Writing about cherry trees , Writing about cherry trees