Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOGIN authe
- <%--
- Document : loginauthe
- Created on : Mar 6, 2019, 11:43:15 AM
- Author : student
- --%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>JSP Page</title>
- </head>
- <body>
- <%String u = request.getParameter("uname");
- String p=request.getParameter("pwd");
- if(u.equals("bmsit") && p.equals("BMSit"))
- {
- %>
- Login Success....! Welcome Mr. /Ms. <%=u%>
- <jsp:include page="index.jsp" flush="true"></jsp:include>
- <%} else {%>
- <span style="color:red">Invalid Attempt.., try again</span>
- <jsp:forward page="login.jsp" ></jsp:forward>
- <%} %>
- </body>
- </html>
- login
- <%--
- Document : login
- Created on : Mar 6, 2019, 11:41:00 AM
- Author : student
- --%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- </head>
- <body>
- <a href="Login.html"> Login</a> |
- <a href="LogoutServlet"> Logout</a> |
- <a href="ProfileServlet"> Profile </a> <hr>
- <form name="loginform" action="loginauthe.jsp" method="post">
- <h1 align="center"> User Login </h1>
- Username:<input type="text" name="uname" value="" size="25" />
- Password:<input type="password" name="pwd" value="" size="25" />
- <input type="submit" value="Login" name="login" />
- </form>
- </body>
- </html>
Add Comment
Please, Sign In to add comment