Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INDEX PAGE--------------------------
- <%--
- Document : index
- Created on : Mar 6, 2019, 10:23:45 AM
- Author : student
- --%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <%@page import="java.util.Date" %>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>JSP Page</title>
- </head>
- <body bgcolor="pink">
- <center> <h1>today day and time is</h1></br>
- <%=new Date()%>
- <h2>greatest of 3 num</h2></br>
- <div style="background-color: plum">
- <form action="greatest.jsp" method="post">
- enter nu1:<input type="number" name="n1"/></br>
- enter nu2:<input type="number" name="n2"/></br>
- enter nu3:<input type="number" name="n3"/></br>
- <input type="submit" name="submit" value="compare"/></br>
- </form>
- </div></center>
- </body>
- </html>
- ----------------------------LOGINPAGE-------------------------------------
- <%--
- Document : loginjsp
- Created on : Mar 6, 2019, 11:41:31 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>
- <form action="loginauthentication.jsp" method="post">
- username:<input type="text" name="uname" value="" />
- password:<input type="password" name="pwd" value="" />
- <input type="submit" name="submit" value="submit" />
- </form>
- </body>
- </html>
- =----------------LOGIN AUTHENTICATION--------------------
- <%--
- Document : loginauthentication
- Created on : Mar 6, 2019, 11:43:47 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.equalsIgnoreCase("bmsit") && p.equalsIgnoreCase("bmsit"))
- {
- %>
- login success.!!welcome..</p><%=u%>
- <jsp:forward page="index.jsp" ></jsp:forward>
- <%}else{ %>
- <span style="color: plum">invalid attempt...</span>
- <jsp:include page="loginjsp.jsp" flush="true"></jsp:include>
- <%}%>
- </body>
- </html>
Add Comment
Please, Sign In to add comment