I want to print the username on jsp page"success.jsp" from "home.jsp" i have used hibernate to save data in table .
"home.jsp"
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <center> <h1 ><font color="red">User-Interface</font></h1> <form action=loginServlet method="post"> <table border="1" bordercolor="red" style="border-style: dotted;" cellpadding="5px" cellspacing="10px"> <tr> <td>UserName:</td><td><input type="text" name="username"></td> </tr> <tr> <td>Password:</td><td><input type="password" name="password"></td> </tr> </table> <input type="submit" value="Log-In" > </form>
New User?<a href="register.jsp"> Register Here</a> </center> </body> </html>
success.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <center> <h1>Welcome</h1> <h2>Please Select Following Options</h2> <table border="1" bordercolor="red" style="border-style: dotted;" cellpadding="5px" cellspacing="10px"> <tr> <td><a href="update.jsp">Update Info</a></td> </tr> <tr> <td><a href="logout.jsp">Logout</a></td> </tr> <tr> <td><a href="home.jsp">Home Page</a></td> </tr> </table> </center> </body> </html>