<html> <head> <title>User Login</title> </head> <br> <body Bgcolor ="#0099cc"><hr><hr> <form method="POST" action="sessionAction.jsp"> <p>UserName: <input type="text" name="UserName" size="10"></p> <p>Password: <input type="Password" name="Password" size="10"></p> <p><input type="submit" value="Submit" name="submit"><input type= "reset" value="Reset" name="reset"></p><hr><hr> </form> </body> </html> --------------------------------------------------------------------------------- <%@page import="java.util.*" %> <%String str = request.getParameter("UserName"); session.setAttribute("UserName", request.getParameter("UserName"));%> Welcome to <%= session.getAttribute( "UserName" ) %> <% if (session.getAttribute("UserName").equals("")){%> <a href="login.jsp">Login </a> <%} else{%> <a href="logout.jsp">Logout</a> <%} %> ---------------------------------------------------------------------------------- <%@page import="java.util.*" %> <%session.invalidate();%> You have logged out. Plese <a href="login.jsp">Login</a> --------------------------------------------------------------------------------</hr></hr></hr></hr></br>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)