Saturday, January 7, 2012

Login Page Using JSP




The code the program is given below:


<html>
<head>
<title>Enter your name and password</title>
</head>
<body bgcolor="#999966">
<p>&nbsp;</p>
<form method="POST" action="login.jsp">
<p><font color="#800000" size="5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Enter your name:</font><input type="text" name="username" size="20"></p>
<p><font color="#800000" size="5">
Enter your password:</font><input type="text" name="password" size="20"></p>
<p><input type="submit" value="Submit" name="B1"></p>
</form>
</body>
</html>

Here is the code of "login.jsp" file:

<%@page contentType="text/html" %>
<html>
<body bgcolor="#999966">
<p><font size="6">Welcome :&nbsp;
<%=request.getParameter("username")%></font></p>
</body>
</html> 

 
 The output of the program is given below:

 This is the output of the above input:





















































































No comments:

Post a Comment

Labels