Beruflich Dokumente
Kultur Dokumente
Project Description
This project uses SQL Server database and J2EE. With this stand, administrator user of online exam system
creates trainees, trainers. Trainer user create questions, Tests, Schedules, etc.
Abstract
The purpose of the system is to develop Online Examination System., used to test the Domain knowledge
of the students, and employees with respect to the particular technology. The manual procedure used for
conducting exam is time consuming process and error prone due to human limitations. The System
purpose is to completely automate the old manual procedure of conducting exam to Online Web Based
Examination System.
Project Implementation:
Home.jsp :
<%@ page contentType="text/html; charset=utf-8" language="java"
import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TCS Test</title>
<script type="text/javascript" src="9lessons.js"></script>
<script type="text/javascript">
if (!ck_username.test(username)) {
errors[errors.length] = "You valid UserName no special char .";
}
if (!ck_password.test(password)) {
errors[errors.length] = "You must enter a valid Password min 6
char.";
}
if (errors.length > 0) {
reportErrors(errors);
return false;
}
return true;
}
function reportErrors(errors){
var msg = "Please Enter Valide Data...\n";
for (var i = 0; i<errors.length; i++) {
var numError = i + 1;
msg += "\n" + numError + ". " + errors[i];
}
alert(msg);
}
</script>
</head>
<body>
<h1 align="center"><strong>Tata Consultancy
Service</strong></h1>
<form name="login" action="login" method="post"
name="login" id="login" onSubmit="return validate(this);">
<p> Username :
<input type="text" name="username"
id="username" />
</p>
<p>Password :
<input type="text" name="password"
id="password" />
</p>
<blockquote>
<blockquote>
<p>
<input type="submit" name="submit"
id="submit" value="Submit" onclick="validate()"/>
</p>
<p />
</form>
</body>
</html>
instructions.jsp
<body>
<% String username=request.getParameter("refno");%>
<%
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:OnlineTest";
Connection con = DriverManager.getConnection(url, "", "");
Statement stmt = con.createStatement();
int max = 35;
int[] temp = new int[max + 1];
for (int idx = 1; idx <= 35; idx++) {
temp[idx] = idx;
}
int t, x;
Random randomGenerator = new Random();
for (int idx = 1; idx < 35; ++idx) {
x = randomGenerator.nextInt(max - 1);
x = x + 1;
t = temp[max];
temp[max] = temp[x];
temp[x] = t;
max--;
}
stmt.execute("create table " + username + "(sno
numeric,qno numeric,choice numeric,cor_ans numeric,mark numeric);");
for (int idx = 1; idx <= 35; idx++) {
stmt.executeUpdate("insert into " + username + "
values ('" + idx + "','" + temp[idx] + "',0,0,0)");
}
con.close();
catch(Exception e)
{
System.out.println(e);
}
%>
<h3>Username : <%= request.getParameter("refno")%>
</h3>
<h3>Password :<%= request.getParameter("dob")
%></h3>
<hr />
<h3>Instructions : </h3>
<p> <strong>1.</strong>Â The test has only one section with 35
objective type questions. </p>
<p><strong>2.</strong>Â On the right top corner you will have a
timer <span id="IL_AD3">counting</span> down and links to questions
of that section. From the timer you can see the time left for that
section and through the questions links you can move to any questions
within that section only. </p>
<p><strong>3.</strong> After answering a questions click the Submit
button to register your answer. You can always come back and change it
within the stipulated time. </p>
<p><strong>4.</strong> EXIT button takes you out of the section. So
click it ONLY after you have attempted all questions of a section.
</p>
<p><strong>5.</strong> After you finish answering CLICK EXIT. DON’T
close the main window WITHOUT clicking EXIT! </p>
<p><strong>6.</strong> For each wrong answer 1/3 of the mark will be
deduced.</p>
<p><strong>7. </strong>Your score will be displayed out of <strong>100
</strong>when you exit the test.</p>
<p> </p>
<form id="form1" name="form1" method="post" action="Home.jsp">
<p />
<label />
<input type="checkbox" name="accept" id="accept"
/>
I read the above instructions clearly and accept
it</p>
<input type="submit" name="submit"
id="submit" value="Start Test" />
</blockquote></blockquote></form>
<p> </p>
</body>
</html>
Test.jsp:
Register.jsp :
<script type="text/javascript">
window.onload = function(){
new JsDatePick({
useMode:2,
target:"inputField",
dateFormat:"%d-%M-%Y"
});
};
</script>
<title>Register</title>
</head>
<body ondragstart="return false" onselectstart="return false">
<form id="form1" name="form1" method="post"
action="registration">
<label>
<blockquote>
<blockquote>
<p>Name :
<input type="text" name="name" id="name" />
</p>
</blockquote>
</blockquote>
</label>
<label>Reference Number :
<input type="text" name="refno" id="refno" />
</label>
<p>
<label>
<blockquote>
<blockquote>
<p>Degree
:
<input type="text" name="degree"
id="degree" />
</p>
</blockquote>
</blockquote>
</label>
</p>
<p>
<label>
<blockquote>
<p>College Name :
<input type="text" name="college"
id="college" />
</p>
</blockquote>
</label>
</p>
<p>
<label>Year of Completed/Passing :
<input type="text" name="passyear" id="passyear"
/>
</label>
</p>
<p>
<label>
<blockquote>
<blockquote>
<p>Date of Birth
:
<input type="text" size="12" name="dob"
id="inputField" />
</p>
</blockquote>
</blockquote>
</label>
</p>
<p>
<label>
<blockquote>
<blockquote>
<p>Mobileno :
<input type="text" name="mobile"
id="mobile" />
</p>
</blockquote>
</blockquote>
</label>
</p>
<p>
<label>
<blockquote>
<blockquote>
<p>Mail ID
:
<input type="text" name="email" id="email"
/>
</p>
</blockquote>
</blockquote>
</label>
</p>
<p>
<label>
<blockquote>
<p>Address Line 1 :
<input type="text" name="addline1"
id="addline1" />
</p>
</blockquote>
</label>
</p>
<p>
<label>
<blockquote>
<p>Address Line 2
:
<input type="text" name="addline2"
id="addline2" />
</p>
</blockquote>
</label>
</p>
<p>
<label>
<blockquote>
<blockquote>
<p>District :
<input type="text" name="district"
id="district" />
</p>
</blockquote>
</blockquote>
</label>
</p>
<p>
<label>
<blockquote>
<blockquote>
<p>Pin Code
:
<input type="text" name="pincode"
id="pincode" />
</p>
</blockquote>
</blockquote>
</label>
</p>
<p>
<label>
<blockquote>
<blockquote>
<p>University
:
<input type="text" name="university"
id="university" />
</p>
</blockquote>
</blockquote>
</label>
</p>
<p>
<label>
<input type="checkbox" name="accept" id="accept"
/>
I agree to the Company's rules and
regulation</label>
</p>
<p>
<label>
<blockquote>
<blockquote>
<blockquote>
<p>
<input type="submit" name="submit" id="submit"
value="Submit" />
</p>
</blockquote>
</blockquote></form>
<blockquote>
</body>
</html>
Output Screenshots :