Professional Documents
Culture Documents
Login.jsp
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
</head>
<body>
</form>
</body>
</html>
LoginServelet.Java
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
response.sendRedirect("Welcome.jsp");
} else {
response.sendRedirect("Login.jsp");
Welcome.JSP
<!DOCTYPE html>
<html>
<head>
<title>Welcome Page</title>
</head>
<body>
<a href="LogoutServlet">Logout</a>
</body>
</html>
LogoutServlet.java
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
session.invalidate();
response.sendRedirect("Login.jsp");
}
Online.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Online Exam</title>
</head>
<body>
<h1>Online Exam</h1>
<h2>Question 1:</h2>
<h2>Question 2:</h2>
</form>
</body>
</html>
9.Design and development of online job using jsp
SOURCE CODE:
Index.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body style="background-color:#EEEEEE; color:#0000FF;">
<div style="position:absolute;left:200px;top:100px;">
<tr>
<td>STATE:</td>
<td><select name="state">
<option>Kerala</option>
<option>Tamilnadu</option>
<option>Karnataka</option>
<option>Oria</option>
<option>Maharashtra</option>
</select>
</td>
</tr>
<tr>
<td>Branch</td>
<td>10th<input type="checkbox" name="ten" value="10th" /></td>
<td>Plus Two<input type="checkbox" name="ten" value="PlusTwo" /></td>
<td>Degree<input type="checkbox" name="ten" value="Degree" /></td>
</tr>
<tr>
<td>
AGE
</td>
<td>
<select name="age">
<%
</div>
</body>
</html>
student1.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<div style="position:absolute;left:200px;top:50px;font-family:Tahoma;font-size:16px;">
<%
String name = request.getParameter("txtname");
String pwd = request.getParameter("txtpwd");
String pwd1 = request.getParameter("txtpwd1");
String adr = request.getParameter("txtaddr"); String
sx = request.getParameter("sex");
String state = request.getParameter("state"); String
ten[] = request.getParameterValues("ten");String
age = request.getParameter("age");
String fname = request.getParameter("fname");
String mname = request.getParameter("mname");
int i;
out.println("<b>");
if (pwd != "") {
if (pwd.equals(pwd1)) {
out.println("<table cellpadding=\"10\"
style=\"border:1px solidblack;padding:20px;
\">");
out.println("<tr><td>Name :</td><td>" + name + "</td></tr>");
out.println("<tr><td>Fathers Name :</td><td>" + fname +
"</td></tr>"); out.println("<tr><td>Mothers Name :</td><td>" +
mname + "</td></tr>"); out.println("<tr><td>Password :</td><td>"
+ pwd + "</td></tr>"); out.println("<tr><td>Address :</td><td>" +
adr + "</td></tr>"); out.println("<tr><td>Sex :</td><td>" + sx +
"</td></tr>"); out.println("<tr><td>State :</td><td>" + state +
"</td></tr>");
out.println("<tr><td><u>QUALIFICATION</u></td></tr>");
out.println("</table>");
} else {
out.println("Pass Word Mismatch");
}
} else {
out.println("Pass Word Can not be null");
}
out.println("</b>");
%>
</div>
</body>
</html>
OUTPUT:
10.Design and development of online message System