Sei sulla pagina 1di 25

DOCUMENTATION ON THE TOPIC

“ONLINE EXAMINATION PORTAL”

Group Members:
• MAYANK RAJ
BENGAL COLLEGE OF ENGINEERING AND TECHNOLOGY
12500216072
• ANURAG KUMAR
BENGAL COLEGE OF ENGINEERING AND TECHNOLOGY
12500216106
• NITYA NARAYAN MAHATO
BENGAL COLEGE OF ENGINEERING AND TECHNOLOGY
12500216064
Table of Contents:

Acknowledgement................................................ 4
Project Objective .................................................. 5
Project Scope ........................................................ 6
Requirement
Specifications........................................................ 7
Database Design ................................................... 8
Application Work Flow ......................................... 9
Screenshots ......................................................... 10
Future Scope of Improvements........................... 11
Code..................................................................... 15
Certificate ........................................................... 21
Acknowledgement :

I take this opportunity to express my profound gratitude


and deep regards to my faculty Mr. Chandan Mukherjee
for his exemplary guidance, monitoring and constant
encouragement throughout the course of this project. The
blessing, help and guidance given by his time to time shall
carry me a long way in the journey of life on which I am
about to embark.
I am obliged to my project team members for the valuable
information provided by them in their respective fields. I
am grateful for their cooperation during the period of my
assignment.

MAYANK RAJ
ANURAG KUMAR
NITYA NARAYAN MAHATO
Project Objective :

ONLINE EXAMINATION PORTAL is a simple design for


implementing web page consisting of different set of multi
choice questions.It consists of user and admin in which user
registers itself for appearing for the given set of questions.Admin
part looks after the questions,user management and
view/delete users from the database.
It is easy accessible so that one can easily sign-in for appearing
in the exam followed by Result that is instantly provided to the
user.

The main aim of the project is to give the basic idea of WEB
APPLICATION DEVELOPMENT using JEE for the purpose of having
an idea of JEE which is widely accepted platform for Enterprise
Software Development.One of the unique feature of
JEE,providing infrastructural service for Enterprise
GradeSoftware,makes it a natural choice for Enterprise Software
Development. JEE is built based on open standard
philosophy,which enables easy integration of external
framework like spring,hibernate etc. making JEE more relevant
for industry.
Project Scope :

• Online exam system is designed for


Educational institute (like
school,college,training centre etc).

• The system handles all the operation and


generates report as soon as the test is finish.

• The type of the question is multiple choice.


Requirement Specifications :
JEE
Hardware Requirement Specifications (Minimum for Client):-

PROCESSOR :- 1.8 GHz.


MOTHERBOARD :- According to the processor requirement
RAM :- 512 MB.
FREE DISK SPACE :- 200MB
INTERNET CONNECTION.

Hardware Requirement Specifications (Minimum for Server):-

PROCESSOR :- 3.2 GHz.


MOTHERBOARD :- According to the processor requirement
RAM :- 4GB.
FREE DISK SPACE :- 1 GB

Software Requirement Specifications: -

CLIENT SIDE:-
Operating System for Client (Any One): - Windiows 10 / Windows 8.1 or 8 / Linux
any version / Mac etc.

Browser (Any One) :-Google Chrome, Microsoft Edge, Mozilla Firefox 40.0

SERVER SIDE:-
Operating System for Server (Any One): - Windows Server or Red hat or Fedora
Linux Server etc

Application Server : Wildfly 17

Database: -MySQL 8.x

Database Connection using JDBC TYPE 4 Driver.

User Interface Created Using HTML 5 , Bootstrap 4


SERVER SIDE WEB COMPONENT: JAVA SERVER PAGES (JSP), SERVLET

ARCHITECTURE – MVC 2.0 (MODEL(Bean) – VIEW(JSP) – CONTROLLER(Servlet))

IDE Used : Eclipse Photo


Implementations:
Database table:
user database table
Coloumn name Data type nullable Primary key

username Varchar2 yes no

useremail Varchar2 yes no

userpassword Varchar2 yes no

User mobile no. Varchar2 yes no

Login table
S no. name Data type length
1 username varchar 50
2 password varchar 50
Database Design:
EMAI PH.N PASS PASS
L O

NAM UID
E

1
USER N MANAG
E ADMIN
1
1
1 1

GIVE MAN.
VIE
S QUES
W EXA .
M

N
SUBJEC
RESULT SUBJEC
N N T
T
TYP

N UID QID
QUESTIONS

MARK
SUB TYPE
S

QID1
QID2
QID3

VIEW
Application Work Flow:

ONLINE EXAMINATION PORTAL

USER ADMIN

REGISTRATION LOGIN

LOGIN ADD/DELETE
QUESTIONS

CHOOSES VIEW/DELETE
SUBJECT USERS

GIVES EXAM VIEW USERS


RESULT

VIEW RESULT LOGOUT

LOGOUT
Screenshots:
Future Scope of Improvements:

Software scope describes the data and control to be


processed,function performance,constraints
Interface and reliability. Function describes in the
Statement of scope are evaluated and in some case
refined to provide more detail prior to the beginning
of the estimation.Because both cost and sechdule
estimates are functionally oriented ,some degree of
decomposition is often useful.

We can implement easily this application.Reusablity


is possible as and when we require in this
application. We can update it next version .We can
add new features as when we require.There is
flexblity in all modules.Scope of this document is to
put down the requirements clearly identifying the
information needed by the user,the source of the
information and output expected from the system

It is highly likely that the scope will change as the


web application as the web projects moves forward
The web process model should be incremental .
The following basic quality in the software always
safeguards the future scope of the software

• Reusablity:- It is possible as and when we require


in this application.We can update it next version
.Reusable software reduces design, coding and
testing.

• Robustness:-Its method is robust it does not fail


even if it receives improper parameters.

• Cost-effectivness:-It cost is under the budget and


make within given period of time .It is desirable
to aim for a system with a minimum cost subject
to a condition that it must satisfy all the
requirements can easily rectified

• Portablity:-Since it is an internet based


application so its portability and usability
depends upon the client connected with the
internet
Code :
User login Sevlet:
package com.proj.controller;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.proj.dao.UserDAOLogic;
import com.proj.model.UserDetailsInfo;

@WebServlet("/UserRegistrationServlet")
public class UserRegistrationServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

public UserRegistrationServlet() {
super();
}

protected void doGet(HttpServletRequest request, HttpServletResponse response)


throws ServletException, IOException {

//SERVLET STEP 2 CREATE OBJECT OF BEAN CLASS


UserDetailsInfo userobj = new UserDetailsInfo();

//STORE VALUE INSIDE OBJECT


userobj.setUsername(request.getParameter("username"));
userobj.setUseremail(request.getParameter("useremail"));
userobj.setUsermobile(request.getParameter("usermobile"));
userobj.setUserpassword(request.getParameter("userpassword"));

//FOR ERROR DEBUGGING


//System.out.println(userobj.getUsername()+" "+userobj.getUsermobile());

//SERVLET STEP 3 CREATE DAO OBJECT


UserDAOLogic daoobj = new UserDAOLogic();
//SERVLET STEP 4 CALL DAO METHOD
boolean replyfromdao = daoobj.userRegistration(userobj);
//SERVLET STEP 5 ACT ACCORDINGLY DEPENDING UPON Reply from DAO
if(replyfromdao)
{
request.setAttribute("regconfirmmsg", "THANKS FOR REGISTRATION");
RequestDispatcher rd = request.getRequestDispatcher("UserRegistration.jsp");
rd.forward(request, response);
}
else
System.out.println("RECORD NOT INSERTED");
}

protected void doPost(HttpServletRequest request, HttpServletResponse response)


throws ServletException, IOException {
doGet(request, response);
}

Adminlogin Servlet:

package com.proj.controller;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/AdminLoginServlet")
public class AdminLoginServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

public AdminLoginServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException{

String adminuserid = request.getParameter("adminuserid");


String adminpassword = request.getParameter("adminpassword");

System.out.println("ADMIN UID" + adminuserid);


System.out.println("ADMIN PASS" + adminpassword);

if(adminuserid.equals("admin") && adminpassword.equals("admin"))


{
System.out.println("WELCOME ADMIN");
//response.sendRedirect("AdminAfterLogin.html");
RequestDispatcher rd = request.getRequestDispatcher("AdminAfterLogin.jsp");
rd.forward(request, response);

}
else
{
System.out.println("INVALID");

request.setAttribute("errormsg", "INVALID UID OR PASSWORD");


RequestDispatcher rd =
request.getRequestDispatcher("AdminLogin.jsp");
rd.forward(request, response);
}
}

protected void doPost(HttpServletRequest request, HttpServletResponse response)


throws ServletException, IOException {
doGet(request, response);
}
}

User Registration:
<%@ page language="java" contentType="text/html;
charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<jsp:include page="BeforeLoginMenu.html"></jsp:include>
<br/>
<div align="center">

<h1>USER REGISTRATION</h1>
<h2>
<div style="color: red; font-weight: bold;">
<%
if(request.getAttribute("regconfirmmsg") != null)
{
out.print(request.getAttribute("regconfirmmsg"));
}
%>
</div>

<form action="UserRegistrationServlet" >


<table>
<tr>
<td> <label for="username">NAME: </label> </td>
<td> <input type="text" name="username" required
placeholder="USER NAME" /> </td>
</tr>

<tr>
<td> <label for="useremail">EMAIL ID: </label>
</td>
<td> <input type="email" name="useremail"
required /> </td>
</tr>

<tr>
<td> <label for="usermobileno">MOBILE NO:
</label> </td>
<td> <input type="tel" name="usermobile" required
/> </td>
</tr>

<tr>
<td> <label for="userpassword">PASSWORD: </label>
</td>
<td> <input type="password" name="userpassword"
required /></td>
</tr>

<tr>
<td align="right"> <input type="submit"
value="REGISTER"> </td>
<td> <input type="reset" value="CLEAR"> </td>
</tr>
</table>
</form>
</div>
</h2>

</body>
</html>

Adminlogin:

<%@ page language="java" contentType="text/html;


charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>ADMIN LOGIN</title>
</head>
<body>
<jsp:include page="BeforeLoginMenu.html"></jsp:include>
<br/>
<div align="center">
<h1>ADMIN LOGIN</h1>
<h2>
<div style="color: red; font-weight: bold;">
<%
if(request.getAttribute("errormsg") != null)
{
out.print(request.getAttribute("errormsg"));
}
%>
</div>
<form action="AdminLoginServlet" method="post"> <!--
SEND INFORMATION TO SERVER -->
<table>
<tr>
<td> <label for="adminuserid">ADMIN USERID:
</label> </td>
<td> <input type="text" name="adminuserid"
required placeholder="ADMIN USER ID" /> </td>
</tr>

<tr>
<td> <label for="adminpassword">ADMIN PASSWORD:
</label> </td>
<td> <input type="password" name="adminpassword"
placeholder="ADMIN PASSWORD"/></td>
</tr>

<tr>
<td align="right"> <input type="submit"
value="LOGIN"> </td>
<td> <input type="reset" value="CLEAR"> </td>
</tr>
</table>
</form>
</div>
</h2>
</body>
</html>

UserDAOLogic:

package com.proj.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.proj.model.UserDetailsInfo;

public class UserDAOLogic


{
public boolean userRegistration(UserDetailsInfo uobj)
{
boolean f = false;
Connection con = DBConnect.getDBConnection();
try
{
PreparedStatement pst = con.prepareStatement
("insert into userdetailsinfo values(?,?,?,?)");
pst.setString(1, uobj.getUsername());
pst.setString(2, uobj.getUseremail());
pst.setString(3, uobj.getUsermobile());
pst.setString(4, uobj.getUserpassword());

int i = pst.executeUpdate();

if(i > 0)
f = true;

} catch (SQLException e) {System.out.println(e);}

return f;
}

public boolean userLoginCheck(String userid, String password)


{
boolean f = false;
ResultSet rs = null;

Connection con = DBConnect.getDBConnection();

try
{
PreparedStatement pst = con.prepareStatement
("select * from userdetailsinfo where useremail =? and userpassword = ?");
pst.setString(1, userid);
pst.setString(2, password);

rs = pst.executeQuery();

if(rs.next())
f = true;

} catch (SQLException e) {System.out.println(e);}

return f;
}

}
Certificate :

This is to certify that Mr. Anurag Kumar of BENGAL


COLLEGE OF ENGINEERING AND TECHNOLOGY,
registration number: 12500216106, has successfully
completed a project on “ONLINE EXAMINATION PORTAL”
using JEE under the guidance of Mr. Chandan Mukherjee.

------------------------------------------------------
Mr. Chandan Mukherjee
Globsyn Finishing School
(a division of Globsyn Skills)
Certificate :

This is to certify that Mr. Mayank Raj of BENGAL COLLEGE


OF ENGINEERING AND TECHNOLOGY, registration
number: 12500216072, has successfully completed a
project on “ONLINE EXAMINATION PORTAL” using JEE
under the guidance of Mr. Chandan Mukherjee.

------------------------------------------------------
Mr. Chandan Mukherjee
Globsyn Finishing School
(a division of Globsyn Skills)
Certificate :

This is to certify that Mr. Nitya Narayan Mahato of


BENGAL COLLEGE OF ENGINEERING AND TECHNOLOGY,
registration number: 12500216064,, has successfully
completed a project on “ONLINE EXAMINATION PORTAL”
using JEE under the guidance of Mr. Chandan Mukherjee.

------------------------------------------------------
Mr. Chandan Mukherjee
Globsyn Finishing School
(a division of Globsyn Skills)

Potrebbero piacerti anche