Sunteți pe pagina 1din 103

1

Project Title Purpose


:

Project Profile
Online Examination System

The purpose of project is to build Online Examination System

Project Category

Client Server Application with JSP and MySQL as back end.

Development Tool Supporting tools Development Environment

: :

JSP and My SQL Microsoft word 2003 for documentation

: Hardware Platform (minimum)


Intel Pentium-IV 2.66 GHz Processor, 80GB Hard disk, 256 MB RAM, 10/100 Mbps Ethernet

Software Platform (minimum) Operating system RDBMS Scripting Language Web Server : Windows : MySQL : Java Script : APACHE Tomcat

Server Scripting Technology: JSP

Project Guide Developed By

:
:

Mr. SUDIPTA BHATTACHARYA SUBHODIP BARDHAN SUBHAM SARKAR SHAN PARVEZ GAYEN ZAHEER ABBAS (071210101022) (071210101033) (071210101025) (071210101026)

Online Examination System

Project Definition ONLINE EXAMINATION SYSTEM

Online examination system is a software with the help of which students will be able to give Examinations on various subjects sitting before their desktop or laptops. This system of giving examination facilitates the students to give examinations sitting at their homes only without being have to displaced elsewhere. The online examination system further privileges the students to know the results of their examinations immediately just after finishing their examinations. The students can also view the past results of all examinations that they have appeared for in this examination system . Summarizing the whole thing we can say that , the online examination system has eased the process of giving examination and its evaluation in varied ways.

Online Examination System

Objective of the Project

An ordinary examination process requires setting up of question papers, allotment of seat for each student, giving answer sheets to each of them, collection of their answer sheets, evaluation of each answer sheet and accordingly preparation of the mark sheet of each student. The above mentioned procedure is not a very easy job to perform manually. The main aim of online examination system is to ease this job. Here, in this system the questions are all set in the software itself. The students just have to sit before the system and answer the questions that come before them. And after the students finish the tests , results are in front of them. So the hectic procedures of seating allotment of students, distribution of questions, collection of answer sheets, evaluation of answer sheets, etc are no more required. Here lies the need or importance of Online Examination System. This module is used for setting up multiple choice tests from a question bank for set time periods, when submitted will give automatically corrected results.

View questions by login in this Online Examination System. View the results immediately for multiple choice questions. Know their results for paragraph type questions after correction by the teacher. View the whole progress report after completing their examination.

Online Examination System

Project Category

The online examination system that is being developed here is basically a client-server project. The whole system is based on client server architecture. Here the students come on the client side and give their examinations while the whole examination system is stored on the server side. In the client side when the students choose one subject and give examinations on it, i.e answer the given questions, their answers (i.e the data) go the server side for evaluation. After evaluation at the server side the results/scores of the examinations come to the client side and the students sitting at the latter get their individual scores. This is how the online examination system , developed here works.

Online Examination System

Feasibility Study

A key part of the preliminary investigation that reviews anticipated costs and benefits and recommends a course of action based on operational, Technical, economic, and time factors. The purpose of the study is to determine if the systems request should proceed further. Does the New System Contribute to the Overall Objectives of the Organization? The new system would contribute to the overall objectives to of the organization. It would provide a quick, error free and cost effective solution to the current process. It would provide a solution to many issues in the current system. As the new system is flexible and scalable it can also be upgraded and extended to meet other complex Requirements which may be raised in the future. However it is up to the organization to upgrade or extend it. Can the New System be Implemented Using Current Technology? The organization has a computer laboratory which has about 50 machines connected by Internet Lan and managed by a server. It would be very easy to set up the system in the current environment as the application is web based it does not require to be installed on every machine.

10 Online Examination System

PROJECT DEVELOPMENT APPROACH

To solve actual problems in an industry, software developer or a team of developers must incorporate a development strategy that encompasses the process, methods and tools layers and generic phases. This strategy is often referred to as process model or a software developing paradigm. A process model for software developing is chosen based on the nature of project and application, the methods and tools to be used, and the controls and deliverables that are required. All software development can be characterized as a problem solving loop in which four distinct stages are encountered: Status quo, Problem definition, technical development and solution integration. Regardless of the process model that is chosen for a software project all of the stages coexist simultaneously at some level of detail. Our Project Follows the Iterative Waterfall Model.

THE ITERATIVE WATERFALL MODEL The steps of the typical Waterfall Model are: 1. Requirement Definition 2. System & Software Design 3. Implementation 4. Integration & System Testing 5. Operation and Maintenance

11 Online Examination System

12 Online Examination System

7
Hardware Requirements:

Hardware and Software Environment

The software developed will run on any Windows Client environment keeping Java enabled server. The minimum specification of Server is: In ONLINE EXAMINATION SYSTEM software the hardware, I have used 80GB Hard disk. 256 MB RAM. Intel Pentium-IV 2.66 GHz Processor. Color Monitor 10/100 Mbps Ethernet The minimum specification of Client is: For Internet Connection Minimum 80 kbps for Client 8 G. B hard disk 128 MB RAM Intel Pentium processor Color monitor 10/100 Mbps Ethernet Key Board Mouse

13 Online Examination System

Hardware and Software Environment (contd)


Software Requirements:

In ONLINE EXAMINATION SYSTEM the software, We have used Server side: Operating system RDBMS Server Scripting Technology Scripting Language Web Server : Windows : MySQL : JSP : Java Script : APACHE Tomcat

Client Side: Operating system : Any Desktop Operating system with a Web Browser (like windows 98 and Internet Explorer)

14 Online Examination System

Requirements Definition

After detailed investigation and understanding of the proposed system, I have decided to include the following features into our project.

8.1. Functional Requirement Definition


Student can view their result online. Facility of transcript/marks sheet print. Very easy to use interface.
questions asked and answers given stored Database different types of multiple choice questions can be asked based on the subject chosen by the student.

Answers processed and marks awarded instantly. View results immediately upon submission.
generation of general marks list summary (total marks obtained) as well as detailed (topic wise marks obtained).

Individual question sheets generation.


the computerized examination system has a facility to add students details, view Students list who have appeared for the Examination.

8.2. Non Functional Requirement Definition


Software will support the existing hardware setup : platform supported Microsoft Sun, Uses browser technology, Requires no extra client software It will also support Windows operating system that is used presently in client side. It will not create security threat to the current computer setup.

15 Online Examination System

9
Features:

Features of Proposed System


Question banks are used Questions and options can be random Time limit and number or rewrites limit Exam active date and time ranges Triggers can be set to skip questions No negative marking Countdown timer Complete storing of old tests Secured system with levels of security Complete audit trail of students

Feedback / Reporting functions:


Student results per exam Student results per question Summary report Full report per exam per student Customized feedback per question/test. The event of feedback can be set, e.g. after all the questions/after each question/ after a section or library/not at all. The examination system indicates what the student answered as well as the correct answer. Extra time can be set for students to work through the feedback after test completion.

Control mechanisms in the test


A time limit can be set for the test. The sequence of questions can be randomized. The distractors/options per question can be randomized. The online examination system limits the number of times a student can write a test. Students can navigate within a test (i.e. backwards and forwards). Can be set. on/off per question/test, e.g. backward/forward buttons. Students can not be forced to go through all the questions at least once, before exiting the test. Students can be allowed to exit the test before completing all the questions. A specific date for a test to be active can be set.

16 Online Examination System

Goals of This System:

Quick Scheduling Exams can be created very quickly as compared to the existing system as it allows the use of previously entered questions to be used again. It saves time required to get the question papers printed and distributed before the students are allowed to appear for the Examination. Questions entered once can be accessed by students as soon as they login to their account. Immediate Results and Solutions One of the most important draw backs of the current system is that the faculties are required to check the answer papers which is again a lengthy process and prone to errors. The new system will generate the result as soon as the test is finished by the user and will also store it in the database for further usage. The solution is also available as soon as the questions are inserted in the database. Easy to Store and Retrieve Information The new system makes it easy to store and retrieve information as required and does not involve storing information in separate sheets or papers. It thus saves data management problems faced in the current system as it has a Database Management System of it own which allows 33 reports to be generated when needed. Cost Effective One of the main reasons of the new system is its cost effectiveness. It saves the amount spend on stationary as well as overall cost of conducting an examination which also involves paying supervisors, paper checkers, question paper printers etc.

17 Online Examination System

10
The Data Flow Diagram (DFD) serves two purposes,

Data Flow Diagrams

To provide an indication of how data are transformed as they move the system.

through

To depict the functions (and sub-functions) that transforms the data flow. The DFD provides additional information that is used during the analysis of the information domain and serves as a basis for the modeling of function. A description of each function presented in the DFD is contained in a Process Specification (PSPEC).

The following pages show the Context Level DFD and Level 1 DFDs.

18 Online Examination System

Level 0 Data Flow Diagram

REQUEST STUDENT

O ______________ ONLINE EXAMINATION SYSTEM

RESPONSE

19 Online Examination System

Level 1 Data Flow Diagram

1.1 _____________ __ REGISTRAIO N

STUDENT DETAILS USER

1. 3 EXAM PROCESS

RESULT

LOG IN DETAILS

STUDENT DETAILS STUDENT LOG IN DETAILS

1.2 _______________ _ LOGIN

ACCEPT / REJECT

20 Online Examination System

Level 1 Data Flow Diagram [CONTD]


RESPONSE 1.4 VIEW HOME STUDENT INFO RESPONSE 1.5 VIEW PROFILE STUDENT STUDENT INFO RESPONSE 1.6 VIEW AVAILABLE EXAM EXAMINATION AVAILABLE EXAMS RESPONSE 1.7 VIEW PAST PAST RESULTS STUD_EXAM 1.9 GIVE FEEDBACK FEEDBACK STUDENT S FEEDBACK 1.8 VIEW COMMENTS ON US FEEDBACK

21 Online Examination System

Level 2 Data Flow Diagram


NUMBER RANGE 1.3.2 RANDOMIZE

SUB_ID SUBJECT

RANDOM-GEN-NO

1.3.3 RETRIEVE QUESTION

QUESTION AND OPTIONS 1.3.4 PERFORM EXAM EXAM_DATA STUD_EXAM STUDENT RESULT 1.3.7 SHOW RESULT DISPLAY RESULT TOTAL MARKS ANSWER STATUS 1.3.6 MARK CHECK GIVEN ANSWER

RETRIEVE QUESTION QUESTION ANSWER

1.3.5 ANS - CHECK

22 Online Examination System

11
Design of Database

Design of Database

For the Database designing a preliminary investigation about the details of the data were performed. MySQL database was chosen for storing the data. Consequently the most appropriate database designing has been resulted. The data are stored in Database. The data are structured table wise. The tables are designed according to the need.

Entity Relationship Diagram


The entity-relationship (E-R) data model is based on a perception of a real world, which consists of a set of basic objects, called entities and relationships among these objects.

The overall logical structure of a database can be expressed graphically by an E-R diagram. A database, which confirms to an E-R diagram, can be represented by a collection of tables. For each entity set and for each relationship set in the database, there is a unique table, which is assigned the name of the corresponding entity set or relationship set in the database. Each table has a number of columns, which again have unique names.

23 Online Examination System

Entity Relationship Diagram


Stud_name Stud_addres s Stud_gende r Stud_ph_no Stud_desired_login_id Stud_passwoor d Exam_id Exam_ duratio n

Sub_id Full_m arks

STUDENT
Stud_email_i d

OPT for

EXAMINA TION

GIVES

Stud_desired_login_id Sub_id

CONTAIN S BASED ON

Comment_no

Status

HA S

STUD_EXAM
Marks_o btained

Cmnt_date Cmnt_time

FEEDBACK

Comments Stud_desired_login_id Exam_time Exam_date

Correct answer qno qdesc

Option 2

Exam_id

SUBJECT

Sub_ name

Sub_ id

Option 1 Option 4

QUESTION_ ANSWER
Sub_id

Option 3

12
Module Description

Module Description

There are basically student and system modules where students can : i. Login Register

ii.
i. ii.

Student must register to give examination for the first time. After Login : i. Change his own profile View own previous score subject wise with date and time View available examination Choose a examination Appear for the test Answers questions and complete / exit the examination View marks immediately

ii.
iii. iv. v. vi. vii.

System module will:

i.
ii.

Acquire and randomize questions per subject Generate feedback and result sheet Maintain previous results Store student details and subject information Maintain security and integrity of the whole system

iii.
iv. v.

13
Table for Examination.. Attribute Sub_id Exam_duration Full_Marks exam_id Data type Int Int Int Varchar Field size 10 10 10 30 Constraints Foreign Key (Subject) Not Null Not Null Primary key Remarks Id of Subject

TABLES

Duration of Exam Full Marks of the Examination Full Marks of the Examination

Table for Student.. Attribute Stud_desired_ login_id Stud_name Data type Varchar Field size 20 Constraints Primary key Remarks Login id of Student

Varchar

20

Not Null

Name of Student

Stud_address

Varchar

100

Not Null

Address of Student

Stud_ph_no

Int

20

Not Null

Phone_no of Student Gender of Student

Stud_gender

Varchar

20

Not Null

Stud_password

Varchar

20

Not Null

Password of Student Mail id of Student

Stud_email_id

Varchar

20

Not Null

Table for Subject.. Attribute Sub_id Sub_name Data type Int varchar Field size 10 20 Constraints Primary key Not Null Remarks Id of Subject Name of Subject

Table for Stud_exam.. Attribute Exam_id Sub_id stud_desired_login_id Exam_date Exam_time Marks_obtained Data type varchar Int Varchar Date Time Int 20 Field size 30 20 20 Constraints Primary Key Foreign Key (Subject) Foreign Key (Student) Not Null Not Null Not Null Remarks Id of Examination Id of subject Login id of Student Date of Examination Time of Examination Marks of Student

Table for Question_Answer... Attribute Qno Ques_desc Sub_id Op1 Op2 Op3 Op4 Answer Data type Int Varchar Int Varchar Varchar Varchar Varchar Varchar Field size 11 10000 11 8000 8000 8000 8000 1 Constraints Primary key Not Null Primary Key Not Null Not Null Not Null Not Null Not Null Remarks No of Question Details of Question Id of Subject Option no 1 Option no 2 Option no 3 Option no 4 Right Answer

Table forFeedback...

Attribute stud_desired_login_id comments status cmnt_date cmnt_time cmnt_no

Data type Varchar Varchar Varchar Date Time Int

Field size 20 4000 20

Constraints Foreign Key (Subject) Not Null Not Null Not Null Not Null

Remarks Id of Subject Duration of Exam Full Marks of Examination Full Marks of Examination Full Marks of Examination Full Marks of Examination the the the the

11

Primary Key

14
Login Page:

Screenshots

Registration page:

oes reg done page:

Successful registration

Password not matching

Successful login

First visit:

More visits:

Profile:

Edit profile:

After editing:

Password change:

Old password wrong

Password changed:

Available exam:

Start exam:

Exam page:

Pressing exit button:

Time over:

Result page:

View past:

Give Feedback

Show Feedback

About Us

Contact Us

After logout move to log in page:

15
Online.jsp <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <head>

Coding

<title>ONLINE EXAMINATION SYSTEM</title> </head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"><tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <form method="post" action= "verify1.jsp"> <table width="100%" border="0" cellpadding="16" cellspacing="0" bgcolor="#CCCCCC"> <tr height="100%"> <td> <img src="pics.jpg" alt="Not Found" WIDTH=875 HEIGHT=500 /> </td> <td> <table width="100%" cellpadding="5" cellpadding="0" border="1" bordercolordark="#333333"> <td> <b>Login id :</b>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <input type="text" name="login_id" size=25> <br><br><b>Password :</b> &nbsp; &nbsp; &nbsp; <input type="password" name="passwd" size=25> <br><br><%session.setAttribute("login","no"); if (request.getParameter("flag") != null) { int f =Integer.parseInt(request.getParameter("flag")); if(f==0) { %><font size=2 color="#000000"><I>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; username and password do not match</I></font><br> <%} else if(f==1) {%> <font size=2 color="#000000"><I>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; Please login first to appear in examination</I></font><br>

<% } } %> <%if (request.getParameter("flag2") != null) { int f2 =Integer.parseInt(request.getParameter("flag2")); if(f2==0) { %> <font size=2 color="#000000"><I> &nbsp; &nbsp;&nbsp; .. The registration has been done successfully..</I></font><br> <% } } %>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type=submit name=SUBMIT value=SIGN_IN > </td> </table><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; Not yet Registered, <br/> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Sign Up Now <a style="color:#000000" href="registrationform.jsp">REGISTER</a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> </td> </tr> </table> </form> </body> </html>

Verify.jsp

<%@ page language="java" import="java.sql.*" errorPage="" %> <% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); String sqlSelectRecord=null; String vlogin = request.getParameter("login_id"); String vpass = request.getParameter("passwd"); sqlSelectRecord="Select count(*) from Student where Stud_desired_login_id='"+vlogin+"' and Stud_password='"+vpass+"'"; Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(sqlSelectRecord); rs.next(); String sqlSelectRecord1=null; sqlSelectRecord1="Select count(visit_id) from visit where Stud_desired_login_id='"+vlogin+"'"; Statement st1 = conn.createStatement(); ResultSet rs1 = st1.executeQuery(sqlSelectRecord1); rs1.next(); int id =rs1.getInt("count(visit_id)")+1; %> <HTML> <BODY> <% int flag=0; if(rs.getInt(1)>0) { session.setAttribute("username", vlogin); session.setAttribute("login", "yes"); PreparedStatement psInsertRecord=null; String sqlInsertRecord=null; sqlInsertRecord="insert into visit(stud_desired_login_id,visit_id,visit_date,visit_time)values(?,?,curdate(),curtime())"; psInsertRecord=conn.prepareStatement(sqlInsertRecord); psInsertRecord.setString(1,vlogin); psInsertRecord.setInt(2,id); psInsertRecord.executeUpdate();

// response.sendRedirect("home.jsp?username="+vlogin); response.sendRedirect("home.jsp"); flag=1; } else { response.sendRedirect("online.jsp?flag=0"); } %> </BODY> </HTML>

Registrationform.jsp

<%@ page language="java" import="java.sql.*" errorPage=""%> <HTML> <HEAD> <TITLE>ONLINE EXAMINATION SYSTEM-registration page</TITLE> <SCRIPT type="text/javascript"> function validate() { var vname = document.form1.name.value; var vph_no = document.form1.ph_no.value; var vemail_id = document.form1.email_id.value; var vdesired_login_id = document.form1.desired_login_id.value; var vpassword = document.form1.password.value; var vretype_password = document.form1.retype_password.value; var vgender = document.form1.gender.value; var vaddress = document.form1.address.value; var vsequirity_question =document.form1.sequirity_question.value; var vsequirity_answer = document.form1.sequirity_answer.value; var vagree = document.form1.agree.value; var e1 = vemail_id.indexOf('@'); var e2 = vemail_id.indexOf('.'); var l = vemail_id.length; if(vname=="") { alert("Enter Name - the field should not be blank"); return false; } if(vgender=="") { alert("Select gender - the field should not be blank"); return false; } if(vaddress=="") { alert("Enter address - the field should not be blank"); return false; } if(vemail_id=="") { alert("Enter email id - the field should not be blank");

return false; } if(vdesired_login_id=="") { alert("Enter desired login id - the field should not be blank"); return false; } if(vpassword=="") { alert("Enter password - the field should not be blank"); return false; } if(vretype_password=="") { alert("Enter retype password - the field should not be blank"); return false; } if(vsequirity_question=="") { alert("Entersequirity question- the field should not be blank"); return false; } if(vsequirity_answer=="") { alert("Enter sequirity answer - the field should not be blank"); return false; } if(vagree=="") { alert("Tick the agree condition - the field should not be blank"); return false; } if(isNaN(vph_no)) { alert("not a valid ph no"); return false; }

if((e1==-1) || (e1==0) || (e1==(l-1)) || (e2==-1) || (e2==0) || (e2==(l-1)) ) { alert("not a valid email"); return false; } if(vdesired_login_id.length>=16) { alert("desired login id must be within 15 character"); return false; } if(vpassword != vretype_password) { alert("password and retype password donot match"); return false; } } </script> </head> <BODY bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="home.jsp">Home</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <table border="0" width="100%" cellpadding="16" cellspacing="0" bgcolor="#CCCCCC" height="80%"> <tr> <td width="25%" bgcolor="#666666"></td> <td width="50%"> <% if (request.getParameter("flag")!= null) { int f =Integer.parseInt(request.getParameter("flag")); if(f==2) { %><font size=4 color="red"><I>The Username is already exist. Please give another Username.</i></font><% } } %>

<fORM name="form1" method="post" onSubmit="return validate()" action="registration.jsp"> <font size=4> <table border="0" width="100%" cellpadding="16" cellspacing="0" bgcolor="#CCCCCC" height="80%"> <tr> <td width="25%" align="right">Name :</td> <td width="75%" align="left"><input type=text name="name" size=45></td></tr> <tr> <td align="right" width="25%">Gender :</td> <td align="left" width="75%"><input type=radio name="gender" value="male"> Male &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<input type=radio name="gender" value="female"> Female</td></tr> <tr> <td width="20%" align="right">Ph No :</td> <td width="80%" align="left"><input type=text name=ph_no size=45></td></tr> <tr> <td width="20%" align="right">Address :</td> <td width="80%" align="left"><textarea rows=3 cols=39 name=address></textarea></td></tr> <tr> <td width="20%" align="right">Email id :</td> <td width="80%" align="left"><input type=text name=email_id size=45 placeholder=" ( It must be a valid, existing email id )"></td></tr> <tr> <td width="20%" align="right">Desired Login id :</td> <td width="80%" align="left"><input type=text name=desired_login_id size=45 placeholder=" ( max 15 char, case sensetive, no space allowed )"></td></tr> <tr> <td width="20%" align="right">Password :</td> <td width="80%" align="left"><input type=password name=password size=45></td></tr> <tr> <td width="20%" align="right">Retype password :</td> <td width="80%" align="left"><input type=password name=retype_password size=45></td></tr> <tr> <td width="20%" align="right">Sequirity question :</td> <td width="80%" align="left"> <select name="sequirity_question"> <option value=1>what is your pet name?</option> <option value=2>What is your library card number?</option> <option value=3>What is your lucky number?</option></select></td></tr> <tr> <td width="20%" align="right">Sequirity answer :</td> <td width="80%" align="left"><input type=text name=sequirity_answer size=45></td></tr></table><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;<input type= checkbox name="agree"><font size=3>I agree all terms and condition and the privacy policy</font><br><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<input type=submit value=SUBMIT>&nbsp; &nbsp;&nbsp; &nbsp;<input type=reset name=reset value=RESET></font></form></td> <td width="25%" bgcolor="#666666"></td></tr></table></body></html> Registration.jsp

<%@ page language="java" import="java.sql.*" errorPage="" %> <% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/online_exam","root", "root"); PreparedStatement psInsertRecord=null; PreparedStatement psSelectRecord=null; String sqlInsertRecord=null; String vName=request.getParameter("name"); String vgender=request.getParameter("gender"); int vphone=Integer.parseInt(request.getParameter("ph_no")); String vaddress=request.getParameter("address"); String vemail=request.getParameter("email_id"); String vlogin=request.getParameter("desired_login_id"); String vpassword=request.getParameter("password"); String vquestion=request.getParameter("sequirity_question"); String vanswer=request.getParameter("sequirity_answer"); int vflag=0; String sqlSelectRecord=null; sqlSelectRecord ="SELECT count(*) from student where Stud_desired_login_id='"+vlogin+"'"; Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(sqlSelectRecord); rs.next(); if(rs.getInt(1)>0) { response.sendRedirect("registrationform.jsp?flag=2"); } else { sqlInsertRecord="insert into student(Stud_name,Stud_gender,Stud_ph_no,Stud_address,Stud_email_id,Stud_desired_login_id,Stud_p assword,Stud_sequirity_question,Stud_sequirity_answer) values(?,?,?,?,?,?,?,?,?)"; psInsertRecord=conn.prepareStatement(sqlInsertRecord); psInsertRecord.setString(1,vName); psInsertRecord.setString(2,vgender); psInsertRecord.setInt(3,vphone); psInsertRecord.setString(4,vaddress); psInsertRecord.setString(5,vemail); psInsertRecord.setString(6,vlogin); psInsertRecord.setString(7,vpassword); psInsertRecord.setString(8,vquestion); psInsertRecord.setString(9,vanswer); psInsertRecord.executeUpdate(); response.sendRedirect("online.jsp?flag2=0"); }%> Home.jsp

<%@ page language="java" session="true" import="java.sql.*" errorPage="" %> <% String vlogin = (String)session.getAttribute("login"); if(vlogin.equals("yes")) { Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); String sqlSelectRecord=null; //String uname = request.getParameter("username"); String uname=(String) session.getAttribute("username"); sqlSelectRecord="Select Stud_name, Stud_desired_login_id from Student where Stud_desired_login_id='"+uname+"'"; Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(sqlSelectRecord); rs.next(); String sqlSelectRecord2=null; sqlSelectRecord2="select count(*) from visit where Stud_desired_login_id='"+uname+"'"; Statement st2 = conn.createStatement(); ResultSet rs2 = st2.executeQuery(sqlSelectRecord2); rs2.next(); %> <html> <head> <title>ONLINE EXAMINATION SYSTEM HOME PAGE</title> <style type="text/css"> <!-aa { color:green; } --> </style> </head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table>

<table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <form name=form1 method="get"> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"> <table border="1" width="150%"> <tr bgcolor="#333333"><td><FONT COLOR="#999999" SIZE="04"><B>HOME</B> </A> </FONT> <BR> <br></td></tr> <tr bgcolor="#333333"><td><A HREF="profile.jsp"><FONT COLOR="#666666" SIZE="04"><B>PROFILE</B></FONT></A> <BR> <br></td></tr> <tr bgcolor="#333333"><td><a HREF="available_exam2.jsp"><FONT COLOR="#666666" SIZE="04"><b>AVAILABLE<BR>EXAMINATION</b></a><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="viewpast.jsp"><FONT COLOR="#666666" SIZE="04"><b>VIEW PAST<BR>RESULT</B></A><BR><BR></b></td></tr> <tr bgcolor="#333333"><td><A HREF="logout.jsp"><FONT COLOR="#666666" SIZE="04"><B>LOG OUT</B></FONT></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="comment.jsp"><FONT COLOR="#666666" SIZE="04"><b>GIVE FEEDBACK</B></A><BR><BR></td></tr></table></td> <td width="75%" bgcolor="#CCCCCC"> <FONT SIZE=4>Welcome <font color=green size=4><b><%=rs.getString("Stud_name")%> .....</b></font> <% int x=rs2.getInt("count(*)"); x--; int y=x; if(y==0) { out.println("<aa>THIS IS YOUR FIRST VISIT... </aa>"); } else { String sqlSelectRecord3=null; sqlSelectRecord3="select visit_time,visit_date from visit where Stud_desired_login_id='"+uname+"' and visit_id="+y+""; Statement st3 = conn.createStatement(); ResultSet rs3 = st3.executeQuery(sqlSelectRecord3); rs3.next(); %> </b><br> <br> You have visited this site <font color=green size=4><b><%=++x%> times.....</b></font><br> <br> your last visit was on &nbsp;<font color=green size=4><b><%=rs3.getString("visit_date")%> at < %=rs3.getString("visit_time")%>.....</b></font> <%}%> <br/></b><br>

<br> This is an online examination system where you can appear test according to your choice from the list of catagories .. <br> <br> After registration you can also visit your profile and also make changes there.. <br> <br> After visiting this site , you can also give us some suggestion or your opinion , if you want..<br> </FONT></p></td></form></tr></table></body></html> <% } else { response.sendRedirect("online.jsp"); } %>

Viewpast.jsp

<%@ page language="java" session="true" import="java.sql.*" errorPage="" %> <% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); String sqlSelectRecord=null; String uname=(String)session.getAttribute("username"); sqlSelectRecord="Select stud_exam.marks_obtained,stud_exam.exam_date,stud_exam.exam_time,stud_exam.exam_id,subject.su b_name from stud_exam,subject where subject.sub_id=stud_exam.sub_id and stud_exam.stud_desired_login_id='"+uname+"'"; Statement st =conn.createStatement(); ResultSet rs =st.executeQuery(sqlSelectRecord); %> <html> <head> <title>ONLINE EXAMINATION SYSTEM-HOME PAGE</title></head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"> <table border="1" width="150%"> <tr bgcolor="#333333"><td><a style="color:#666666" href="home.jsp"><FONT SIZE="04"><B>HOME</B></FONT> </A> <BR> <br></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="profile.jsp"><FONT SIZE="04"><B>PROFILE</B></font></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="available_exam2.jsp"><FONT SIZE="04"><b>AVAILABLE<BR>EXAMINATION</B></A><BR><br></td></tr> <tr bgcolor="#333333"><td><FONT color="#999999" SIZE="04"><b>VIEW PAST <br>RESULT</B></FONT><BR><BR></b></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="logout.jsp"><FONT SIZE="04"><B>LOG OUT</B></FONT></A><BR><BR></td></tr>

<tr bgcolor="#333333"><td><a style="color:#666666" HREF="comment.jsp"><FONT SIZE="04"><b>GIVE FEEDBACK</B></A><BR><BR></td></tr></table></td> <td width="75%" bgcolor="#CCCCCC"> <% if(!rs.next()) { %> <font color="red" size=4> You didnot appear for any examination</font> <% } else { %> <table border=1 color="black"> <TR><TD><B><U>Exam No</U></TD> <TD><B><U>Exam Date</U></TD> <TD><B><U>Exam Time</U></TD> <TD><B><U>Subject</U></TD> <TD><B><U>Marks</U></TD> </TR> <TR align="center"><TD><B><font color="#333333" size=4><%=rs.getInt("exam_id") %></font></TD> <TD><B><font color="#333333" size=4><%=rs.getString("exam_date")%></font></TD> <TD><B><font color="#333333" size=4><%=rs.getString("exam_time")%></font></TD> <TD><B><font color="#333333" size=4><%=rs.getString("Sub_name")%> </font></TD> <TD><B><font color="#333333" size=4><%=rs.getInt("marks_obtained")%></font></TD> <% int cnt=1; while(rs.next()) { %> <TR align="center"><TD><B><font color="#333333" size=4><%=rs.getInt("exam_id") %></font></TD> <TD><B><font color="#333333" size=4><%=rs.getString("exam_date")%></font></TD> <TD><B><font color="#333333" size=4><%=rs.getString("exam_time")%></font></TD> <TD><B><font color="#333333" size=4><%=rs.getString("Sub_name")%> </font></TD> <TD><B><font color="#333333" size=4><%=rs.getInt("marks_obtained")%></font></TD> </TR> <% cnt++; } %> </table> <% } %> </td> </tr></table></body></html> Profile.jsp

<%@ page language="java" session="true" import="java.sql.*" errorPage="" %> <% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); String sqlSelectRecord=null; // String uname2=request.getParameter("username"); String uname=(String) session.getAttribute("username"); sqlSelectRecord="Select * from Student where Stud_desired_login_id='"+uname+"'"; Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(sqlSelectRecord); rs.next(); %> <!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=iso-8859-1" /> <title>ONLINE EXAMINATION SYSTEM-HOME PAGE</title></head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <table cellpadding="16" border="0" cellspacing="0" width="100%"> <tr> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"> <table border="1" width="150%"> <tr bgcolor="#333333"><td><a style="color:#666666" href="home.jsp"><FONT SIZE="04"><B>HOME</B></FONT> </A> <BR> <br></td></tr> <tr bgcolor="#333333"><td><FONT color="#999999" SIZE="04"><B>PROFILE</B></FONT></A> <BR> <br></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="available_exam2.jsp"><FONT SIZE="04"><b>AVAILABLE<BR>EXAMINATION</B></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="viewpast.jsp"><FONT SIZE="04"><b>VIEW PAST<BR>RESULT</B></A><BR><BR></b></td></tr>

<tr bgcolor="#333333"><td><a style="color:#666666" HREF="logout.jsp"><FONT SIZE="04"><B>LOG OUT</B></FONT></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="comment.jsp"><FONT SIZE="04"><b>GIVE FEEDBACK</B></A><BR><BR></td></tr></table></td> <td width="70%" bgcolor="#CCCCCC"><br /><br /><br /><br /><br /><br /><font size=4>Welcome&nbsp; &nbsp;&nbsp; &nbsp;<font color="#666666" size="5"><b>< %=rs.getString("Stud_name")%>.....</b>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <FONT COLOR="#666666"><a href="profile2.jsp" style="color:#333333">Edit profile</a></font><br> <br> Name : &nbsp; &nbsp; &nbsp; &nbsp; <font color="#333333"> <%=rs.getString("Stud_name") %></font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <FONT COLOR="#333333"><a href="cpass.jsp" style="color:#333333">Change Password</a></font><br> <br> Gender : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=rs.getString("Stud_gender")%><BR> <BR> Ph No : &nbsp; &nbsp; &nbsp; &nbsp;<%=rs.getString("Stud_ph_no")%><BR> <BR> Address : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=rs.getString("Stud_address")%><BR> <BR> Email id : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=rs.getString("Stud_email_id")%> </font></p> <p><font size=4> <% if (request.getParameter("flag") != null) { int f =Integer.parseInt(request.getParameter("flag")); if(f==1) {%> <font size=4 color="#666666"><I>Your Profile has been changed successfully</i></font> <%} else if (f==2) {%> <font size=4 color="#666666"><I>Your Pasword has been changed successfully</i></font> <%}}%></font><br /><br /><br /><br /><br /><br /><br /></td></tr></table></body></html>

Profile2.jsp <%@ page language="java" session="true" import="java.sql.*" errorPage="" %>

<% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); String sqlSelectRecord=null; //String uname2=request.getParameter("username"); String uname=(String)session.getAttribute("username"); sqlSelectRecord="Select * from Student where Stud_desired_login_id='"+uname+"'"; Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(sqlSelectRecord); rs.next(); %> <html> <head> <title>ONLINE EXAMINATION SYSTEM-HOME PAGE</title> <SCRIPT language="javascript"> function validate() { var vname = document.form1.name.value; var vgender = document.form1.gender.value; var vph_no = document.form1.phone.value; var vaddress = document.form1.address.value; var vemail_id = document.form1.email.value; var e1 = vemail_id.indexOf('@'); var e2 = vemail_id.indexOf('.'); var l = vemail_id.length; if(vname=="") { alert("Enter Name - the field should not be blank"); return false; } if(vgender=="") { alert("Select gender - the field should not be blank"); return false; } if(vaddress=="") { alert("Enter address - the field should not be blank"); return false;

} if(vemail_id=="") { alert("Enter email id - the field should not be blank"); return false; }

if(isNaN(vph_no)) { alert("not a valid ph no"); return false; }

if((e1==-1) || (e1==0) || (e1==(l-1)) || (e2==-1) || (e2==0) || (e2==(l-1)) ) { alert("not a valid email"); return false; } } </script></head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"> <table border="1" width="150%"> <tr bgcolor="#333333"><td><A HREF="home.jsp" style="color:#FFFFFF"><FONT COLOR="#666666" SIZE="04"><B>HOME</B></FONT></A> <BR> <br></td></tr> <tr bgcolor="#333333"><td><FONT COLOR="#999999" SIZE="04"><B>PROFILE</B> </A> </FONT> <BR> <br></td></tr>

<tr bgcolor="#333333"><td><A HREF="available_exam2.jsp" style="color:#FFFFFF"><FONT COLOR="#666666" SIZE="04"><b>AVAILABLE<BR>EXAMINATION</B></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="viewpast.jsp" style="color:#FFFFFF"><FONT COLOR="#666666" SIZE="04"><b>VIEW PAST</B><BR>RESULT</A><BR><BR></b></td></tr> <tr bgcolor="#333333"><td><A HREF="logout.jsp" style="color:#FFFFFF"><FONT COLOR="#666666" SIZE="04"><B>LOG OUT</B></FONT></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="comment.jsp" style="color:#FFFFFF"><FONT COLOR="#666666" SIZE="04"><b>GIVE FEEDBACK</B></A><BR><BR></td></tr></table></td> <td width="75%" bgcolor="#CCCCCC"> <FONT SIZE=4>Welcome &nbsp; &nbsp;&nbsp; &nbsp;<font color="#666666" size=5><b>< %=rs.getString("Stud_name")%>.....</b></font><br><br></FONT> <form name="form1" method="post" action="update.jsp" onSubmit="return validate()"> <font size="4"><b>Name :&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</b><font color="#666666"><Input type="text" name="name" value="< %=rs.getString("Stud_name")%>"></font></font> <font size="4">&nbsp;&nbsp; <br><br><b>Gender : &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; </b><font color="#666666"><Input type="text" name="gender" value="< %=rs.getString("Stud_gender")%>"><BR><BR></font></font> <font size="4"><b>Ph No : &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</b><font color><Input type="text" name="phone" value="<%=rs.getString("Stud_ph_no")%>"><BR><BR></font></font> <font size="4"><b>Address : &nbsp; &nbsp; &nbsp; &nbsp;</b><font color="#666666"> <Input type="text" name="address" value="<%=rs.getString("Stud_address")%>"> <BR><BR> </font></font> <font size="4"><b>Email id : &nbsp;&nbsp; &nbsp; &nbsp; </b><font color="#666666"> <Input type="text" name="email" value="<%=rs.getString("Stud_email_id")%>"> <BR><BR></font></font> <font size="4">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; <INPUT TYPE="hidden" NAME="hidden" VALUE="<%=rs.getString("Stud_desired_login_id")%>"> <Input type="submit" value="SUBMIT" > </font></form> </td> </tr> </table> </body> </html>

Cpass.jsp <%@ page language="java" session="true" import="java.sql.*" errorPage="" %> <% Connection conn = null;

Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); String sqlSelectRecord=null; // String uname2=request.getParameter("username"); String uname=(String)session.getAttribute("username"); sqlSelectRecord="Select * from Student where Stud_desired_login_id='"+uname+"'"; Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(sqlSelectRecord); rs.next(); %> <html> <head> <title>ONLINE EXAMINATION SYSTEM-HOME PAGE</title> <SCRIPT type="text/javascript"> function validate() { var op = document.form1.oldpass.value; var np = document.form1.newpass.value; var cp = document.form1.confirmpass.value; if(op=="") { alert("Enter the old password"); return false; } if(np=="") { alert("Enter the new password"); return false; } if(cp=="") { alert("confirm the password"); return false; } if(np != cp) { alert("New password and confirm password donot match"); return false;

} } </script></head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"> <table border="1" width="150%"> <tr bgcolor="#333333"><td><A HREF="home.jsp" style="color:#666666"><FONT SIZE="04"><B>HOME</B></FONT></A> <BR> <br></td></tr> <tr bgcolor="#333333"><td><FONT COLOR="#999999" SIZE="04"><B>PROFILE</B> </A> </FONT> <BR> <br></td></tr> <tr bgcolor="#333333"><td><A HREF="available_exam2.jsp" style="color:#666666"><FONT SIZE="04"><b>AVAILABLE<BR>EXAMINATION</B></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="viewpast.jsp" style="color:#666666"><FONT SIZE="04"><b>VIEW PAST</B><BR>RESULT</A><BR><BR></b></td></tr> <tr bgcolor="#333333"><td><A HREF="logout.jsp" style="color:#666666"><FONT SIZE="04"><B>LOG OUT</B></FONT></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="comment.jsp" style="color:#666666"><FONT SIZE="04"><b>GIVE FEEDBACK</B><BR></A><BR><BR></td></tr></table></td> <td width="75%" bgcolor="#CCCCCC"> <FONT SIZE=4> Welcome &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#666666" size=5><b> <%=rs.getString("Stud_name")%>.....</b></font> </font><br> <br><br><br> <form name="form1" method="post" onsubmit="return validate()" action="cpasschek.jsp" > <p><b>Old Password :&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<font color=green size=4> <input type="password" name="oldpass" > </font></b>&nbsp;&nbsp; <br> <b>New Password : &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </b><font color=green size=4> <input type="password" name="newpass"> <BR>

<BR> </font>

<b>Confirm Password : &nbsp; &nbsp; </b> <font color=green size=4> <Input type="password" name="confirmpass"> <BR> <BR> </font> &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <Input type="submit" value="SUBMIT"> </p> </form> <% if (request.getParameter("flag") != null) { int f =Integer.parseInt(request.getParameter("flag")); if (f==3) { %> <font size=4 color="red"><I> Your Old Pasword does not match </i></font> <% } } %> </FONT> </td> </tr> </table> </body>

Cpasscheck.jsp <%@ page language="java" session="true" import="java.sql.*" errorPage="" %>

<% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/online_exam","root", "root"); PreparedStatement psUpdateRecord=null; String sqlUpdateRecord=null; String sqlSelectRecord=null; Statement st = conn.createStatement(); String uname=(String)session.getAttribute("username"); String opass=request.getParameter("oldpass"); String npass=request.getParameter("newpass"); String conpass=request.getParameter("confirmpass"); sqlSelectRecord="Select Stud_password from Student where Stud_desired_login_id='"+uname+"'"; ResultSet rs =st.executeQuery(sqlSelectRecord); rs.next(); String pass=rs.getString("Stud_password"); int vflag=0; if(opass.equals(pass)) { sqlUpdateRecord="Update student set Stud_password=? where Stud_desired_login_id='"+uname+"'"; psUpdateRecord=conn.prepareStatement( sqlUpdateRecord); psUpdateRecord.setString(1,npass); psUpdateRecord.executeUpdate(); vflag=2; response.sendRedirect("profile.jsp?flag="+vflag); } else { vflag=3; response.sendRedirect("cpass.jsp?flag="+vflag); } try{ if(psUpdateRecord!=null) { psUpdateRecord.close(); } if(conn!=null) { conn.close(); } } catch(Exception e) { e.printStackTrace();

} %> <html> <body> </body> </html>

Update.jsp <%@ page language="java" import="java.sql.*" errorPage="" %> <% Connection conn = null;

Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/online_exam","root", "root"); PreparedStatement psUpdateRecord=null; String sqlUpdateRecord=null; String uname=request.getParameter("hidden"); String vname=request.getParameter("name"); String vgender=request.getParameter("gender"); int vphone=Integer.parseInt(request.getParameter("phone")); String vaddress=request.getParameter("address"); String vemail=request.getParameter("email"); int vflag=0; try { sqlUpdateRecord="Update student set Stud_name=?, Stud_gender=?, Stud_ph_no=?, Stud_address=?, Stud_email_id=? where Stud_desired_login_id='"+uname+"'"; psUpdateRecord=conn.prepareStatement( sqlUpdateRecord); psUpdateRecord.setString(1,vname); psUpdateRecord.setString(2,vgender); psUpdateRecord.setInt(3,vphone); psUpdateRecord.setString(4,vaddress); psUpdateRecord.setString(5,vemail); psUpdateRecord.executeUpdate(); vflag=1; } catch(Exception e) { e.printStackTrace(); } try{ if(psUpdateRecord!=null) { psUpdateRecord.close(); } if(conn!=null) { conn.close(); } } catch(Exception e) { e.printStackTrace();

} %> <html> <body> <% response.sendRedirect("profile.jsp?flag="+vflag); %> </body> </html>

Available_exam2.jsp <%@ page language="java" import="java.sql.*" errorPage="" %> <% Connection conn = null;

Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/online_exam","root", "root"); PreparedStatement psUpdateRecord=null; String sqlUpdateRecord=null; String uname=request.getParameter("hidden"); String vname=request.getParameter("name"); String vgender=request.getParameter("gender"); int vphone=Integer.parseInt(request.getParameter("phone")); String vaddress=request.getParameter("address"); String vemail=request.getParameter("email"); int vflag=0; try { sqlUpdateRecord="Update student set Stud_name=?, Stud_gender=?, Stud_ph_no=?, Stud_address=?, Stud_email_id=? where Stud_desired_login_id='"+uname+"'"; psUpdateRecord=conn.prepareStatement( sqlUpdateRecord); psUpdateRecord.setString(1,vname); psUpdateRecord.setString(2,vgender); psUpdateRecord.setInt(3,vphone); psUpdateRecord.setString(4,vaddress); psUpdateRecord.setString(5,vemail); psUpdateRecord.executeUpdate(); vflag=1; } catch(Exception e) { e.printStackTrace(); } try{ if(psUpdateRecord!=null) { psUpdateRecord.close(); } if(conn!=null) { conn.close(); } } catch(Exception e) { e.printStackTrace();

} %> <html> <body> <% response.sendRedirect("profile.jsp?flag="+vflag); %> </body> </html>

Confirmation2.jsp <%@ page language="java" session="true" import="java.sql.*" errorPage=" " session="true" %>

<% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); PreparedStatement psSelectRecord=null; ResultSet rsSelectRecord=null; String sqlSelectRecord=null; int subID=Integer.parseInt(request.getParameter("sub_id")); session.setAttribute("subID", subID); sqlSelectRecord="SELECT sub_name, exam_duration,full_marks from subject, examination where subject.sub_id=examination.sub_id and subject.sub_id=?"; psSelectRecord=conn.prepareStatement(sqlSelectRecord); psSelectRecord.setInt(1,subID); rsSelectRecord=psSelectRecord.executeQuery(); rsSelectRecord.next(); String sname = rsSelectRecord.getString("sub_name"); int marks = rsSelectRecord.getInt("full_marks"); int time = rsSelectRecord.getInt("exam_duration"); session.setAttribute("sname", sname); session.setAttribute("marks", marks); session.setAttribute("time", time); %> <html> <head> <title> ONLINE EXAMINATION SYSTEM-HOME PAGE</title> <script language="JavaScript"> function move() { window.location = 'available_exam2.jsp' } </script></head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%">

<tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"> <table border="1" width="150%"> <tr bgcolor="#333333"><td><FONT COLOR="#999999" SIZE="04"><B>HOME</B> </A> </FONT> <BR> <br></td></tr> <tr bgcolor="#333333"><td><% String vlogin = (String)session.getAttribute("login");if(vlogin.equals("yes")){ %><A HREF="profile.jsp"><FONT COLOR="#666666" SIZE="04"><B>PROFILE</B></FONT></A><BR> <br></td></tr><%}%> <tr bgcolor="#333333"><td><a HREF="available_exam2.jsp"><FONT COLOR="#666666" SIZE="04"><b>AVAILABLE<BR>EXAMINATION</b></a><BR><BR></td></tr> <tr bgcolor="#333333"><td><% if(vlogin.equals("yes")){ %><A HREF="viewpast.jsp"><FONT COLOR="#666666" SIZE="04"><b>VIEW PAST<BR>RESULT</B></A><BR><BR></b></td></tr><%}%> <tr bgcolor="#333333"><td><A HREF="logout.jsp"><FONT COLOR="#666666" SIZE="04"><B>LOG OUT</B></FONT></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="comment.jsp"><FONT COLOR="#666666" SIZE="04"><b>GIVE FEEDBACK</B></A><BR><BR></td></tr></table></td> <td width="75%" bgcolor="#CCCCCC"> <font size =3+> There is 30 questions in each subject. Each question carry 2 marks and no negetive marks is there..</font><br><br><br> <TABLE CELLPADDING="8"> <FORM NAME="Examdetails" ACTION="startexam.jsp" METHOD="post"> <TR> <TD><b>Exam Name:-</TD> <TD><font color="green"> <B><%=rsSelectRecord.getString("sub_name")%> </font></TD></TR> <TR> <TD><b>Full Marks:-</TD> <TD><font color="green"> <B><%=rsSelectRecord.getInt("full_marks")%> </font></TD></TR> <TR> <TD><b>Time :-</TD> <TD><font color="green"> <B><%=rsSelectRecord.getInt("exam_duration")%>mins </font></TD></TR> <TR> <TD><INPUT TYPE="SUBMIT" VALUE="START EXAMINATION"></TD> <TD><INPUT TYPE="RESET" VALUE="CANCEL" onClick="move();" ></TD></TR></TABLE> </TD></TR></FORM></TD></TR></Table></BODY></HTML>

Testpage.jsp <html> <head> </head>

<frameset rows="7,93" framespacing="0" frameborder="no" border="0"> <frame name="f1" src="header.jsp"> <frame name="f1" src="marks.jsp"> </frameset><noframes></noframes> </html>

Startexam.jsp

<%@ page import="java.sql.*" %> <%@ page import="java.io.*" session="true" %>

<% String vlogin=(String)session.getAttribute("login"); if(vlogin.equals("yes")) { Connection connection = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String connectionURL = "jdbc:mysql://localhost:3306/online_exam"; connection = DriverManager.getConnection(connectionURL,"root", "root"); String uname=(String)session.getAttribute("username"); int sid= ((Integer)session.getAttribute("subID")).intValue(); Statement statement2 = null; statement2 = connection.createStatement(); ResultSet rs2 = null; PreparedStatement psInsertRecord=null; String sqlInsertRecord=null; rs2=statement2.executeQuery("SELECT max(exam_id) from stud_exam where stud_desired_login_id='"+uname+"'"); rs2.next(); int eid2= rs2.getInt(1)+1; out.println(eid2); sqlInsertRecord="insert into stud_exam(stud_desired_login_id,exam_id,sub_id,exam_date,exam_time) values(?,?,?,curdate(),curtime())"; psInsertRecord=connection.prepareStatement(sqlInsertRecord); psInsertRecord.setString(1,uname); psInsertRecord.setInt(2,eid2); psInsertRecord.setInt(3,sid); psInsertRecord.executeUpdate(); session.setAttribute("examid",eid2); response.sendRedirect("testpage.jsp"); } else

{ response.sendRedirect("online.jsp?flag=1"); } %>

Header.jsp <%@ page import="java.sql.*" %> <%@ page import="java.io.*" session="true" %> <html>

<head> <title>ONLINE EXAMINATION SYSTEM-HOME PAGE</title> <script type="text/javascript"> var c=30*60; var t; function timedCount() { if(c>=0) { document.getElementById('txt').value=parseInt(c/60)+" min "+parseInt(c%60)+" sec"; c=c-1; t=setTimeout("timedCount()",1000); } else { clearTimeout(t); alert("your time is over"); window.top.location='quitexam.jsp' } } </script></head> <body bgcolor="#333333" onLoad="timedCount()"> <table width="100%" bgcolor="#666666" border="0" height="100%"> <tr height="10%"> <TD>&nbsp;</TD> <TD align="right"> <form> <font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Time remaining </strong></font><input type="text" id="txt" disabled></form></TD></TR> </table></body></html>

Marks.jsp <%@ page import="java.sql.*" %> <%@ page import="java.io.*" session="true" %>

<% Connection connection = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String connectionURL = "jdbc:mysql://localhost:3306/online_exam"; connection = DriverManager.getConnection(connectionURL,"root", "root");

int nos=1; PreparedStatement psInsertRecord=null; String sqlInsertRecord=null; sqlInsertRecord ="insert into number(no) values(?)"; psInsertRecord=connection.prepareStatement(sqlInsertRecord); psInsertRecord.setInt(1,nos); psInsertRecord.executeUpdate(); int vqno =(int) (Math.random() * 15); if(vqno==0) vqno=1; int marks =0; session.setAttribute("marksob",marks); String uname=(String)session.getAttribute("username"); String sname=(String)session.getAttribute("sname"); int mark= ((Integer)session.getAttribute("marks")).intValue(); int duration=((Integer)session.getAttribute("time")).intValue(); int sid= ((Integer)session.getAttribute("subID")).intValue(); int eid2=((Integer)session.getAttribute("examid")).intValue(); if (request.getParameter("hidden") != null) { vqno = (int) (Math.random() * 15) ; if(vqno==0) vqno=1; marks = Integer.parseInt(request.getParameter("hidden2")); if (request.getParameter("op") != null) { String option=request.getParameter("op"); String corrop=request.getParameter("hidden1"); if(option.equals(corrop)) { marks=marks+2; session.setAttribute("marksob",marks); } else{

marks=marks-1; session.setAttribute("marksob",marks); } } else { marks=marks+0; session.setAttribute("marksob",marks); } } PreparedStatement psUpdateRecord=null; Statement statement = null; statement = connection.createStatement(); Statement statement1 = null; statement1 = connection.createStatement(); ResultSet rs = null; ResultSet rs1 = null; String sqlUpdateRecord=null; rs1 = statement1.executeQuery("SELECT count(no) from number"); if (rs1.next()) { int qc=rs1.getInt("count(no)"); int b= 20-qc; out.println("<h3>you have "+b+" more questions left...</h3>"); if(qc<21) session.setAttribute("qcs",qc); else {%> <script language="JavaScript"> window.top.location = 'quitexam.jsp' </script> <%}}%> <% rs = statement.executeQuery("SELECT qdesc,op1,op2,op3,op4,answer from question_answer where question_answer.sub_id='"+sid+"' and qno='"+vqno+"'"); if (!rs.next()) { %> <script language="JavaScript"> window.top.location = 'quitexam.jsp' </script> <% } else { %>

<html> <head> <style type="text/css"> <!-h3 { color:#CCCCCC; font-size:large; } --> </style> <script language="JavaScript"> function move() { input_box=confirm("So you want to quit from exam?"); if (input_box==true) { window.top.location = 'quitexam.jsp' } } </script> </head> <body bgcolor="#333333"> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="82%" bgcolor="#666666"> <tr><td> <Table align="center" width="100%" border="0"> <tr align="center"> <td width="35%" align="right"><font size=4 color="#FFFFFF"> <b><u><%=sname %></u></b></font></td> <td width="30%" align="center"><font size=3 color="#FFFFFF"><b>Full Marks= <%=mark %></b></td> <td width="35%" align="left"><font size=3 color="#FFFFFF" align="right"><b>Time=<%=duration %></b></font></td></tr> <FORM NAME="form1" ACTION="marks.jsp" METHOD="get"> <TABLE style="background-color:#CCCCCC;" WIDTH="100%" border="0" cellpadding="0" cellspacing="0" border="1"> <TR><td width="25%" bgcolor="#666666"></td> <TD width="50%"> <% int a=(Integer)session.getAttribute("qcs");%> <%=a++%> <%=rs.getString("qdesc")%><br><br> <input type=radio name=op value=a><%=rs.getString("op1")%><br> <input type=radio name=op value=b><%=rs.getString("op2")%><br> <input type=radio name=op value=c><%=rs.getString("op3")%><br> <input type=radio name=op value=d><%=rs.getString("op4")%><br><br><BR> <INPUT TYPE="hidden" NAME="hidden" VALUE="<%=vqno%>">

<INPUT TYPE="hidden" NAME="hidden1" VALUE="<%=rs.getString("answer")%>"> <INPUT TYPE="hidden" NAME="hidden2" VALUE="<%=marks%>"> <INPUT TYPE="submit" VALUE="Submit" > <INPUT TYPE="Reset" VALUE="Exit" onClick="move();"></TD> <td width="25%" bgcolor="#666666"></td></tr></TABLE><br/><br/><br/><br/><br/><br/><br/><br/></FORM><% } %></td></tr></table></body></html>

Quitexam.jsp <%@ page import="java.sql.*" %> <%@ page import="java.io.*" session="true" %> <%

Connection connection = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String connectionURL = "jdbc:mysql://localhost:3306/online_exam"; connection = DriverManager.getConnection(connectionURL,"root", "root"); PreparedStatement psUpdateRecord=null; String sqlUpdateRecord=null; String uname=(String)session.getAttribute("username"); int eid2=((Integer)session.getAttribute("examid")).intValue(); int marks= ((Integer)session.getAttribute("marksob")).intValue(); sqlUpdateRecord="Update stud_exam set marks_obtained=? where stud_desired_login_id='"+uname+"' and exam_id='"+eid2+"'"; psUpdateRecord=connection.prepareStatement( sqlUpdateRecord); psUpdateRecord.setInt(1,marks); psUpdateRecord.executeUpdate(); PreparedStatement psdel=null; Statement st = null; st = connection.createStatement(); st.executeUpdate("delete from number"); %> <html> <head> <title>ONLINE EXAMINATION SYSTEM-HOME PAGE</title></head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.html">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.html">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <form name=form1 method="get"> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"> <table border="1" width="150%"> <tr bgcolor="#333333"><td><A HREF="home.jsp"><FONT COLOR="#666666" SIZE="04"><B>HOME</B> </A> </FONT> <BR> <br></td></tr>

<tr bgcolor="#333333"><td><A HREF="profile.jsp"><FONT COLOR="#666666" SIZE="04"><B>PROFILE</B></FONT></A> <BR> <br></td></tr> <tr bgcolor="#333333"><td><a HREF="available_exam2.jsp"><FONT COLOR="#666666" SIZE="04"><b>AVAILABLE<BR>EXAMINATION</b></a><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="viewpast.jsp"><FONT COLOR="#666666" SIZE="04"><b>VIEW PAST<BR>RESULT</B></A><BR><BR></b></td></tr> <tr bgcolor="#333333"><td><A HREF="logout.jsp"><FONT COLOR="#666666" SIZE="04"><B>LOG OUT</B></FONT></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><A HREF="comment.jsp"><FONT COLOR="#666666" SIZE="04"><b>GIVE FEEDBACK</B></A><BR><BR></td></tr></table></td> <td width="75%" bgcolor="#CCCCCC"> <table width="100%" border="0"> <tr> <td height="21"> <div align="center"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif"> <% out.println(" Examination Complete."); %></div></font></td></tr> <tr> <td> <div align="center"><font color="#333333" face="Verdana, Arial, Helvetica, sansserif"><strong>You have scored <%=marks %>&nbsp;</strong></font></div></td></tr> <% double p =marks;%> <td> <div align="center"><font color="#333333" face="Verdana, Arial, Helvetica, sansserif"><strong>You have scored <%=p*2.5 %> % &nbsp;</strong></font></div></td></tr> <tr> <td>&nbsp;</td></tr> <tr> <td>&nbsp;</td></tr> <tr> <td>&nbsp;</td></tr></table> </td> </tr> </table> <p>&nbsp;</p> </body> </html>

Comment.jsp <%@ page language="java" session="true" import="java.sql.*" errorPage="" session="true" %> <% Connection conn = null;

Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); String uname=(String) session.getAttribute("username"); %> <html> <head> <title>ONLINE EXAMINATION SYSTEM-HOME PAGE </title></head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">Home</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="about.jsp">About Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"> <table border="1" width="150%"> <tr bgcolor="#333333"><td><a style="color:#666666" href="home.jsp"><FONT SIZE="04"><B>HOME</B></FONT> </A> <BR> <br></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="profile.jsp"><FONT SIZE="04"><B>PROFILE</B></font></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="available_exam2.jsp"><FONT SIZE="04"><b>AVAILABLE<BR>EXAMINATION</B></A><BR><br></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="viewpast.jsp"><FONT SIZE="04"><b>VIEW PAST <br>RESULT</B></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><a style="color:#666666" HREF="logout.jsp"><FONT SIZE="04"><B>LOG OUT</B></FONT></A><BR><BR></td></tr> <tr bgcolor="#333333"><td><FONT color="#999999" SIZE="04"><b>GIVE FEEDBACK</B></FONT><BR><BR></b></td></tr></table></td> <td width="75%" bgcolor="#CCCCCC"> <form name="cmnt" method="post" action="cmnt_prcs.jsp"><center> <textarea rows=7 cols=50 name="fdbk"></textarea><BR><BR> RATE THIS SYSTEM: <select name="select"> <option></option> <option value="GOOD">GOOD</option> <option value="MEDIUM">MEDIUM</option> <option value="OK">OK</option></select><BR><BR> <input type="submit" name="submit" value="submit"><input type="reset" name="reset" value="reset"></td></tr></table></center></form></form></body></html>

Cmnt_prcs <%@ page language="java" session="true" import="java.sql.*" errorPage="" %> <% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); PreparedStatement psInsertRecord=null; String sqlInsertRecord=null; String uname=(String) session.getAttribute("username"); String cmnt=request.getParameter("fdbk"); String st=request.getParameter("select"); sqlInsertRecord="insert into feedback(stud_desired_login_id,comments,status,cmnt_date,cmnt_time) values(?,?,?,curdate(),curtime())"; psInsertRecord=conn.prepareStatement(sqlInsertRecord); psInsertRecord=conn.prepareStatement(sqlInsertRecord); psInsertRecord.setString(1,uname); psInsertRecord.setString(2,cmnt); psInsertRecord.setString(3,st); psInsertRecord.executeUpdate(); response.sendRedirect("home.jsp"); %>

Show_feedback.jsp <%@ page language="java" session="true" import="java.sql.*" errorPage="" %> <% Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); String jdbcURL="jdbc:mysql://localhost:3306/online_exam"; conn = DriverManager.getConnection(jdbcURL,"root", "root"); String sqlSelectRecord=null; sqlSelectRecord="Select stud_name,comments,status,cmnt_date,cmnt_time from student,feedback where student.stud_desired_login_id=feedback.stud_desired_login_id"; Statement st =conn.createStatement(); ResultSet rs =st.executeQuery(sqlSelectRecord); %>

<html> <head> <title> ONLINE EXAMINATION SYSTEM-HOME PAGE </title> </head> <body bgcolor="#CCCCCC"> <table cellpadding="8" > <tr > <td> <form name=form1 method="get"> <% if(!rs.next()) { %><font color="red" size=4> NO COMMENTS FOUND... </font> <% } else { %> <table border="1" color="black"> <TR> <TD><B><font color="yellow" size=4><%=rs.getString("stud_name")%></font> &nbsp;says: </TD> <TD><B><font color="green" size=4><%=rs.getString("status")%></font></TD> <TD><B>&nbsp;&nbsp;&nbsp;on&nbsp;&nbsp;<font color="green" size=4>< %=rs.getString("cmnt_date")%></font></TD> <TD><B>&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp;<font color="green" size=4>< %=rs.getString("cmnt_time")%></font></TD> </tr>

<tr> <TD><B><font color="green" size=4><%=rs.getString("comments")%></font></TD> </tr> <tr> <td><% int cnt=1; while(rs.next()) { %> </td> </tr> <TR> <TD><B><font color="yellow" size=4><%=rs.getString("stud_name")%></font> &nbsp;says: </TD> <TD><B><font color="green" size=4><%=rs.getString("status")%></font></TD> <TD><B><font color="green" size=4>&nbsp;</font> &nbsp;&nbsp;on&nbsp;&nbsp;< %=rs.getString("cmnt_date")%> </font></TD> <TD><B><font color="green" size=4>&nbsp;</font>&nbsp;&nbsp;at&nbsp;&nbsp;< %=rs.getString("cmnt_time")%></TD> </tr> <tr> <TD><B><font color="green" size=4><%=rs.getString("comments")%></font></TD> </tr> <tr> <td></td> </tr><% cnt++; } %> </table> <% } %> </form> </td> </tr> </table> </body> </html>

About.jsp <%@ page contentType="text/html; charset=iso-8859-1" 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=iso-8859-1" /> <title>Untitled Document</title> </head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="home.jsp">Home</a></td> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">About Us</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"></td> <td width="75%" bgcolor="#CCCCCC"> <table border="0" width="100%" height="100%"> <tr> <td width="10%"><img src="Blue hills.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Sunset.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Water lilies.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Winter.jpg" height=121/> </td> <td width="90%">abcd</td></tr></table></td></tr></table> </body> </html>

About.jsp <%@ page contentType="text/html; charset=iso-8859-1" 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=iso-8859-1" /> <title>Untitled Document</title> </head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="home.jsp">Home</a></td> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">About Us</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"></td> <td width="75%" bgcolor="#CCCCCC"> <table border="0" width="100%" height="100%"> <tr> <td width="10%"><img src="Blue hills.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Sunset.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Water lilies.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Winter.jpg" height=121/> </td> <td width="90%">abcd</td></tr></table></td></tr></table> </body> </html>

Contact.jsp <%@ page contentType="text/html; charset=iso-8859-1" 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=iso-8859-1" /> <title>Untitled Document</title> </head> <body bgcolor="#333333"> <table border="0" width="100%" cellpadding="16" cellspacing="0"> <tr> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="home.jsp">Home</a></td> <td width="25%" align="center" bgcolor="#999999" ><b style="color:#FFFFFF">About Us</b></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="contact.jsp">Contact Us</a></td> <td width="25%" align="center" bgcolor="#666666" ><a style="color:#FFFFFF" href="show_feedback.jsp">Comments on Us</a></td></tr></table> <table cellpadding="16" border="0" cellspacing="0" width="100%" height="80%"> <tr> <marquee bgcolor="#A6A6A6" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" scrolldelay="130">Welcome To Online Examination System</marquee> <td width="15%" bgcolor="#666666" bordercolor="#333333" align="left"></td> <td width="75%" bgcolor="#CCCCCC"> <table border="0" width="100%" height="100%"> <tr> <td width="10%"><img src="Blue hills.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Sunset.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Water lilies.jpg" height=121/> </td> <td width="90%">abcd</td></tr> <tr> <td width="10%"><img src="Winter.jpg" height=121/> </td> <td width="90%">abcd</td></tr></table></td></tr></table> </body> </html>

Logout.jsp <%@page import="java.util.*" %> <html> <head> <title>ONLINE EXAMINATION SYSTEM-HOME PAGE</title></head> <body> <%session.invalidate(); response.sendRedirect("online.jsp");%>

</body> </html>

16
1. Install Apache Tomcat 2. Install MySql server 3. Install the Executable Jar File

Software Installation Guide

4. Save all the documents in C:\program Files\Tomcat\webapps\root\online 5. Make a database and Tables in MySql 6. Start the Tomcat Server 7. Execute the file by specifying the path name in the Web Broswer like

http:\\localhost:8080\online\online.jsp

17

Project Scope / Limitations

In spite of being a much user friendly system to Work on, the online examination system developed here has a few limitations which can be implemented in the future development of the project. The Limitations are : 1. Once a student starts giving the examination he/she must finish it, i.e he/she cannot answer some questions now and the remaining questions later. 2. Once a student clicks the Exit button he/she comes out of the system and has no scope to answer any question further. If they want to answer questions further then they have to reappear for the examination all over again from the beginning. Once a student answers a question and goes to the next question, he/she has no opportunity to go back to the previous question. Similarly if a student skips a question without answering it and goes to the next question he/she has no chance of going back to the previous question and answer it.

3.

18

Further Enhancement

In the further enhancement section, that is, the future development section deep thoughts can be given to the limitations of the system and measures are to be sought out remove those limitations from the system to make it more userfriendly. Getting rid of those limitations will not only improve the standard of the system but will help students to give examination through this system with much more ease and comfort. More of the features which can be included in the system in future are : Supports inclusion of graphics, videos, sounds, and flash animation Multiple response questions Matching columns Missing words / Fill in the blanks Macromedia Flash questions Multiple true/false questions Numeric questions Graphical hot spots with multiple groups Free format questions

19

Conclusion

Online examination system is a software with the help of which students will be able to give Examinations on various subjects sitting before their desktop or laptops. This system of giving examination facilitates the students to give examinations sitting at their homes only without being have to displaced elsewhere. The online examination system further privileges the students to know the results of their examinations immediately just after finishing their examinations and also can view the previous results. It will be very much beneficial for the students of the institutions who would get our software because the institution will be able to give the very basic idea of giving examination online to their students.

20

Bibliography and Web Links


1. Giulio Zambon, Michael Seckler, (2001), Beginning JSPTM & TomcatTM Devolopment: From Novice to Professional, Apress Ltd. 2. Hans Bergstein, (2006), Java Server Pages, Orielly. 3. Eric T Freeman, Elizabeth Freeman, (2005), Head First HTML & XHTML, Orielly

1. http://tomcat.apache.org for apache tomcat 2. http://www.sunjava.net for jsp 3. http://www.mysql.com for mysql 4. http://www.roseindia.net for jsp, mysql references. 5. http://www.wikipedia.com for miscllenious purpose.

(THE ABOVE MENTIONED BOOKS AND WEBSITES HAVE BEEN CONSULTED IMMENSELY THROUGHOUT THE PROGRESS AND DEVELOPMENT OF THE THIS PROJECT)

S-ar putea să vă placă și