code 1: <%@ 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>Create New Student</title> </head> <body> <form name="create" method="post" action="<%=request.getContextPath()%>/Controller"> <input type="hidden" name="page" value="create"/><br/> <input type="text" name="fname" id=""/><br/> <input type="text" name="lname" id=""/><br/> <input type="text" name="age" id=""/><br/> <input type="text" name="gender" id=""/><br/> <input type="text" name="phone" id=""/><br/> <input type="submit" value="Create"/> </form></body> </html> code 2: <%@ 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>Delete Student</title> </head> <body> <form method="post" action="<%=request.getContextPath()%>/Controller"> <input type="hidden" name="page" value="delete"/> <center>Enter the name to delete:<br/><input type="text" name="fname"/><br/> <input type="submit" value="Delete record"/></center> </form> </body> </html> code3: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@page import="java.sql.*"%> <%@page import="java.util.*"%> <%@ page session="true"%> <%@page import="java.io.*"%> <%@page import="java.net.*"%> <%@page import="javax.servlet.*"%> <!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>Student Home</title> </head> <body> <p>Welcome Student.. What do you want to do..</p> <center> <p><a href="<%=request.getContextPath()%>/jsp/Create.jsp">Create</a> </p> <p><a href="<%=request.getContextPath()%>/jsp/View.jsp">View </a></p> <p><a href="<%=request.getContextPath()%>/jsp/Update.jsp">Update </a></p> <p><a href="<%=request.getContextPath()%>/jsp/Delete.jsp">Delete </a></p> </center></body> </html> code4: <%@ 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>Update</title> </head> <body><form method="post" action="<%=request.getContextPath()%>/Controller"> <center> <input type="hidden" name="page" value="update"/> Please enter ur name<br/><input type="text" name="fname"/><br/> <input type="submit" value="Get Details"/></center></form> </body> </html> code 5: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@page import="com.beans.SampleBean" %> <!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>Your Information</title> <% SampleBean resultObject=(SampleBean)request.getAttribute("result"); %> </head> <body> <center> <form action="<%=request.getContextPath()%>/Controller" method="post"> <input type="hidden" name="page" value="updatedetails"/> <table> <tr><td>First Name:</td><td><input type="text" name="fname" value="<%=resultObject.getFname() %>"/></td></tr> <tr><td>Last Name:</td><td><input type="text" name="lname" value="<%=resultObject.getLname() %>"/></td></tr> <tr><td>Age:</td><td><input type="text" name="age" value="<%=resultObject.getAge() %>"/></td></tr> <tr><td>Gender:</td><td><input type="text" name="gender" value="<%=resultObject.getGender() %>"/></td></tr> <tr><td>Phone:</td><td><input type="text" name="phone" value="<%=resultObject.getPhone() %>"/></td></tr> <tr><td colspan="2"><input type="submit" value="Update Details"/></td></tr></table> </form> </center> </body> </html> code 6: <%@ 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>View ur Details</title> </head> <body> <center> <form method="post" action="<%=request.getContextPath()%>/Controller"> <input type="hidden" name="page" value="view"/> <center> <input type="text" name="fname"/> <br/><input type="submit" value="Search"/></center> </form></center> </body> </html> code 7: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@page import="com.beans.SampleBean" %> <!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>Your Information</title> <% SampleBean resultObject=(SampleBean)request.getAttribute("result"); %> </head> <body> <center><table cellpadding="10" cellspacing="10" border="1"> <tr><th>First Name</th><th>Last Name</th><th>Age</th><th>Gender</th><th>Phone</th></tr> <tr><th><%=resultObject.getFname() %></th><th><%=resultObject.getLname() %></th><th><%=resultObject.getAge() %></th><th><%=resultObject.getGender() %></th><th><%=resultObject.getPhone() %></th></tr> </table> </center> </body> </html>
Ads