Hi,
I'm having my login page as:
<html><head><body>
<form action="validateuser.jsp" method="POST">
username - <input type="text" name="userName">
password - <input type="password" name="passWord">
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form></body></html>
And Validator Page as :
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.*" %>
<jsp:useBean id="idHandler" class="com.suntec.tbms3.ui.Login" scope="request">
<jsp:setProperty name="idHandler" property="*"/>
</jsp:useBean>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><body>
<%
String userName = request.getParameter("userName");
String passWord = request.getParameter("passWord");
if (idHandler.authenticate(userName, passWord))
{
response.sendRedirect("welcome.jsp");
}
else
{
response.sendRedirect("retry.jsp");
}
%>
</body></head>
</html>
where I'm validating the username and pass word from my DB.
Now I want to display the user login name in my welcom.jsp page. what are the modification i've to do in validator.jsp and welcome.jsp