Exam Registration System
Exam Registration System
Exam Registration System
Project Number: 6
6.0 INTRODUCTION:
To analyze, design and develop code for Exam Registration System using Rational Rose
software and implement it using JSP.
OVERALL DESCRIPTION:
The Exam Registration System is an integrated system that has four modules as part of it. The
four modules are,
1) Registration for the exam: In this module, the candidate registers into the system with the
various credentials.
2) Accessing Exam Center: In this module the candidate changes or modifies the available
exam centers for his locality.
3) Candidate Verification: In this module the candidate is verified by the registration controller.
4) Generation of unique identification number: In this module a unique identification number
is generated by the system for the candidate.
Rational Rose
MySql – Database
Apache Tomcat – Localhost Server
Text Editor – JavaServlet Page
128MB RAM
Pentium III Processor
Network card
JSP:
Valreg.jsp:
<html>
<body>
<%@ page
language="java"
import="java.sql.*"%>
<%@ page
language="java"
import="javax.sql.*"%>
<%
String
user=request.getParameter("uname");
session.putValue("uname",user);
String pwd=request.getParameter("pass");
String name=request.getParameter("name");
String email=request.getParameter("email");
String addr=request.getParameter("addr");
String cit=request.getParameter("city");
Class.forName("com.mysql.jdbc.Driver");
java.sql.Connection
con=DriverManager.getConnection("jdbc:mys
ql://localhost:3306/exam","root","root");
Statement stmt=con.createStatement();
String c="0";
int i=stmt.executeUpdate("insert into cand
values
('"+user+"','"+pwd+"','"+name+"','"+addr+"','
"
+email+"','"+cit+"','"+c+"','"+c+"','"+c+"')");
if(i!=0)
Exam Center <select name="center">
<%java.sql.Connection
{%>
<form
con2=DriverManager.getConnection("jdbc:my
name="centerselection"
sql://localhost:3306/exam","root","root");
method="post"
Statement stmt2=con2.createStatement();
action="valcenter.jsp">
ResultSet rst=null;
<h3>Step 2:</h3>
rst=stmt2.executeQuery("select * from center
<h4>Select nearest
where local='"+cit+"'");
center of examination for your
while(rst.next()){%>
locality</h4>
<option><%=rst.getString(1)%></option>
<h4>Re-enter your
<option><%=rst.getString(2)%></option>
username for security
<option><%=rst.getString(3)%></option>
reasons</h4>
<option><%=rst.getString(4)%></option>
Username <input
</select><br>
type="text"
name="uname2"><br>
<input type="submit" <%
value="Complete stmt.close();
Registration"> con.close();
</form> }%>
<%} </body>
} </html>
else
{%> <center><a
href="reg.jsp">Unsuccessful
registration<br>Click here to try
again</a></center>
Valcenter.jsp:
Vallogin.jsp:
<%@ page
<%@ page language="java" language="java"
import="java.sql.*"%> import="javax.sql.*"%>
<%
String <%
userid=request.getParameter("unamef"); }
String pwd=request.getParameter("passf"); else
{
String DRIVER = "org.gjt.mm.mysql.Driver";
Class.forName(DRIVER).newInstance();
Connection con=null;
ResultSet rst=null;
Statement
stmt=null; ResultSet
rst2=null;
String url="jdbc:mysql://localhost/exam?
user=root& password=root";
con=DriverManager.getConnection(url);
stmt=con.createStatement();
rst2=stmt.executeQuery("select * from admin
where uname='"+userid+"'");
if(rst2.next())
{
if(rst2.getString(2).equals(pwd))
{
Cookie cc=new
Cookie("logincredentials","userid");
response.addCookie(cc);
out.println("Welcome "+userid); %>
<br><center><a href="admin.jsp"
target="_top">Click here to enter the Admin
panel</a><center>
out.println("Invalid username/password");%> response.addCookie(cookie);
<br><center><a out.println("Welcome "+rst.getString(3)); %>
href="login.jsp" <br><center><a href="stud.jsp"
target="_top">Click here target="_top">Click here to enter the
to try again</a><center> Candidate panel</a><center>
<% } <%
} }
rst2.close(); else
rst=stmt.executeQuery("select * {
from cand where out.println("Invalid username/password");%>
uname='"+userid+"'"); <br><center><a href="login.jsp">Click
if(rst.next()) here to try again</a><center>
{ <%
if(rst.getString(2).equals(pwd)) }
{ }
Cookie cookie = new Cookie %>
("username",userid);
MYSQL Queries:
Database Schema:
delimiter $$
Admin Table:
delimiter $$
Candidate Table:
delimiter $$
delimiter $$
FRONT-END DESIGN:
Home Page:
Candidate Panel
Admin Panel:
6.12.1 COMPONENT DIAGRAM:
6.13 CONCLUSION:
This project was carried out in a sequential manner to design and implement the “Exam
Registration System”. Thus the outcome of the project is efficient. The Exam Registration System
caters the varied requirements of the user to perform the functionality with ease and efficiency.