Report On Online College Magzine

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 47

PROJECT REPORT

ON

ONLINE COLLEGE MAGAZINE

Submitted in partial fulfillment of the requirement for the award of degree of

Bachelors of Technology

In

Computer Science & Engineering


(Batch: 2008-2012)

KIIT COLLEGE OF ENGINEERING


GURGAON

Under the Guidance of: Submitted by:


Mrs. Namita Khurana Kumar Ankit(1137418122)
Palki Asija(1137418153)
Akshay Gupta(1137423080)
Certificate

Certified that Kumar Ankit, student of sem. 8th IT batch(2008-12) KIIT College of
Engineering have undertaken the project work entitled “Online College Magazine”
under the supervision of Mrs. Namita Khurana as per requirement stipulated in the
course curriculum . The performance of the student has been satisfactory.

Project Guide: HOD (CSE/IT) Principal


Mrs. Namita Khurana
KIIT College of Engineering, Gurgaon
Lecturer(CSE/IT)
Acknowledgement

The project work entitled “Online College Magazine” was carried out at KIIT College
of Engineering, Gurgaon under the guidance of Mrs. Namita khurana. We gratefully
acknowledge the guidance of our project Incharge for the successful completion of the
project. The support of Head of the Department, Director General Principal, faculty and
the laboratory staff in execution of project is gratefully acknowledged.

Kumar Ankit

Palki Asija

Akshay Gupta
Abstract

The project “ONLINE COLLEGE MAGAZINE” assists the students in posting and reading
academic articles , Subjective notes. Using this online system , one can can enhance technicual
as well as subjective knowledge by reading articles . you can manage all your information from a
single database file. Within the file, divide your data into separate storage containers called
tables; view, add, and update table data using online forms; it includes forums, Post and
comments and some FAQs on the related topics, through which we can create networking with
other existing users.

This website includes the whole profile of the KIIT students, it also gives the relevant
information or notices about various events to the students of KIIT. This website uses the .net
platform for the development of the project. It is made very user friendly and easy to use.
Content List

S. no. Content Page no.


1. Introduction 1
2. Project Scope 2
3. Objectives and features of the project 3
4. Materials and Methods 5
a. Hardware requirements

b. Software requirements

6. Project design and Architecture 6


7. Coding 15
8. Screenshots 32
9. Design Phase ER Diagrams and Data Flow Diagrams(DFD) 47
a. Zero level DFD
10. Application areas and future perspectives 49
11. References and Bibliography 50

Introduction to the Project :

Project definition: Online College Magazine


Online college Magazine is a forum where college students and faculties can post and read
various articles, thus promoting literary insight. Articles can be searched by anybody in the
world.
The Program can also include feature of categorizing articles , one can give feed back , Rate the
article , One can Search article by category or topic as well. Topics get sorted by constraint of
most viewed and tags are attached to article by number of reads.
The project is an effort to build a professionally look /featured online forum , with an user
friendly Interface and lot of features to grab visitors and provide them lot at a place.

Project Scope

 The goal of our project is to create a Online Forum that will enable college students and
faculties to post and read various articles, thus promoting literary insight.
 Factors behind the motivation of this system are:
1. Not all students make it to the printed magazine.
2. Creativity of students needs to be nurtured.
3. Creating a user-friendly interactive place where students/faculties can share their
ideas.
 J2EE is used as the basic programming platform for the software. J2EE provides a vast
Library of tools for developing the required user interface of our software, and also the
various inbuilt security authentications need in project.
.

OBJECTIVES & FEATURES OF THE PROJECT

Objectives :

 To explore and implement a online forum where college students and faculties can post
and read various articles
 To provide the user with an easy User Interface (GUI) , where user can search article ,
can comment , can Rate article.
 To gain experience in the Java programming.
 To create the project as an servlet for use on the web, so users can log on to my home
page and use this program.

FOLLOWING ARE THE FEARTURES IN SOFTWARE

i. Search Engine for all the articles posted till date. Accessible by anybody.
ii. Essential steps to be taken to prevent authenticity infringement.
iii. Articles to be distributed in categories. Can overlap 2 or more categories. Articles to be
associated with suitable tags by the registered users at the time of posting, so that they are
searchable.
iv. The home page to consist of attractive essential features like: recent post’s, college news,
blogs etc.
v. Interactive feedback to be supported to enhance the user experience.
vi. Guests can read articles, Blogs, College news . They can also access other optional features
(amenities like Word of the day, etc.) but can’t post articles unless they sign in as registered
users.
vii. Prevent standard automated software from filling out a form.
viii. Alumni registration to be supported.
ix. Registered members, Moderators and Administrators are allowed to post articles.
x. Registered users, Moderators, and Admins will have their own profile, where they can edit
info for the world to see. Useful “updated” info related to their activities to be available at their
profiles.
xi. Regex to be extensively used for prohibiting obscene and unacceptable comments.
xii. Moderators will have associated categories, according to which to-be-validated-articles will
be posted to them on their profiles. On rejection, he will have to provide a reason for the same,
which will be forwarded to the concerned user.
xiii. Automated mails to be sent on rejection/acceptance of articles.
Admin can add/delete moderators. Progress report of moderators will be available to her/him.
Admin has all the privileges a moderator has. Can post news which will be visible at the home
page.

MATERIALS AND METHODS :

Minimum Hardware Requirements


 Pentium IV processor @ 2GHz or above
 512 MB RAM
 40 GB Hard Disk
 Scroll mouse
 Standard Keyboard

Software Requirements
 Operating system – Windows XP or Windows 7
 Jdk6.0,
 jre6.0,
 Apache Tomcat Server7.0
 IDE : Eclipse 3.0
 MySQL

Project Architecture :
For Implementing modules MVC (Model View Controller) architecture is used.
Model View Controller:

Model–View–Controller (MVC) is an architectural pattern that splits interactions
between users and applications into three roles:

the Model (business logic),

the View (user interface), and

the Controller (user input).
This separation of concerns facilitates the independent development, testing, and
maintenance of each role.

Login.jsp

<form action="loginAction"
name="login" method="post">
<center><table>
<tr><td><font face="verdana,arial"
size=-1>Login:</td><td><input
type="text" name="loginId" /></td></tr>
<tr><td><font face="verdana,arial"
size=-1>Password:</td><td><input
type="password" name="password"
/></td></tr>
<tr><td><font face="verdana,arial"
MVC Example :
size=-1>&nbsp;</td><td><font
face="verdana,arial"
View: size=-1><input
type="submit" name="Submit"
value="Submit"/></td></tr>
<tr><td colspan=2><font
face="verdana,arial"
size=-1>&nbsp;</td></tr>
</table></center>
</form>
LoginServlet.java

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws


ServletException, IOException {
String destination = "error.jsp";
String loginId = request.getParameter("loginId");
String password = request.getParameter("password");
HttpSession session = request.getSession(false);
LoginAction action = new LoginAction();
try {
User user = action.loginAuthentication(loginId, password);
session.setAttribute("userName", user.getName());
session.setAttribute("lastLogin", user.getLastLogin());
destination = "welcomeUser.jsp";
response.sendRedirect(destination);
System.out.println("singin");
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect(destination);
MVC Example :
}
Controller:
LoginAction.java

public class LoginAction {


public User loginAuthentication(String loginId, String password) throws Exception {
UserDAO userDAO = new UserDAO();
User user = userDAO.getUserDetails(loginId);
if(user != null) {
if(password.equals(user.getPassword())) {
System.out.println("Login Successful");
} else {
System.out.println("Login Failed");
throw new Exception ("Invalid User Id");
}
}
return user;
}
}

MVC Example :
Model:
LoginDao.java

public User getUserDetails(String loginId) throws Exception {Connection con = null;


PreparedStatement stmt = null;
ResultSet rs = null; User user = new User()
try {
con = DBConnection.getConnection();
if(con != null && !con.isClosed()) {
String query = "select login_id, password, category, active_date, inactive_date, last_login,
name, mobile, age, email, user_description from user where login_id = ?";
stmt = con.prepareStatement(query);
stmt.setString(1, loginId);
rs = stmt.executeQuery();
while(rs.next()) {
user.setLoginId(rs.getString("login_id"));
user.setPassword(rs.getString("password"));
user.setCategory(rs.getString("category"));
user.setName(rs.getString("name"));
user.setMobile(rs.getString("mobile"));
MVC Example :
user.setAge(rs.getString("age")); user.setEmail(rs.getString("email"));
user.setUserDescription(rs.getString("user_description")); } } else {
throw new SQLException("%%%% ERROR IN GETTING CONNECTION WITH
DATABASE %%%%"); } } catch (Exception e) {
throw e;
} finally {
DBConnection.closeAll(con, stmt, rs);
}
return user:
}
Testing and Test suits:

MVC Architecture Planning :

1. Get the Requirement of Student Connect


2. Develop Schema
3. Designed the Project on board
4. Developed DB Schema (creation of tables)
5. Created a Dynamic Web Project
6. Configured Tomcat Server
7. Created Project Hierarchy
8. Developed some packages
9. Create POJO Classes as per the table names (Getter/Setter)
10. Created a sample jsp and deployed on server
11. Created a login jsp page and deployed on server
12. Created a Servlet and get the values of JSP into it.
13. Passed the JSP values from Servlet to Action CLass (Business Logic here)
14. Created a DAO (Data Access Object) layer for the User Table.
15. Created a DB Connection and perform the DB Operation (Retrieve).
16. On the basis of Values of User we performed the business logic of Login either Success/Fail
17. If success, shown the welcome page with the Hello <UserName>
18. On Error, shown the error.jsp page
Coding : Registrationservlet.java

package com.ankit.student.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ankit.student.action.RegistrationAction;

public class RegistrationServlet extends HttpServlet{

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.doGet(req, resp);
}

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
String destination = "registration.jsp";
String name = request.getParameter("name");
String age = request.getParameter("age");
String mobile = request.getParameter("mobile");
String email = request.getParameter("email");
String password = request.getParameter("password");
System.out.println(password);
String confirmPassword = request.getParameter("confirmPassword");
RegistrationAction action = new RegistrationAction();
try {
action.performRegistration(name, age, mobile, email, password,
confirmPassword);
destination="welcomeUser.jsp";
response.sendRedirect(destination);

} catch (Exception e) {
e.printStackTrace();

response.sendRedirect(destination);
}

}
}
Coding :
Registrationaction.java

package com.ankit.student.action;

import com.ankit.student.dao.UserDAO;
import com.ankit.student.pojo.User;

public class RegistrationAction {

public void performRegistration(String name, String age, String mobile, String email, String
password, String confirmPassword) throws Exception {

validateRegistrationData(name, age, mobile, email, password, confirmPassword);


User user = new User();
user.setName(name);
user.setAge(age);
user.setMobile(mobile);
user.setEmail(email);
user.setPassword(confirmPassword);
UserDAO dao = new UserDAO();
dao.createUser(user);
}

public void validateRegistrationData(String name, String age, String mobile, String email,
String password, String confirmPassword) throws Exception {

if(age != null && age != "" && Integer.parseInt(age) <18) {


throw new Exception("Exception in the Age Part");
}
if(mobile != null && mobile != "" && mobile.length() >10) {
throw new Exception("Exception in the Mobile Number part");
}
}
}
Coding :
Userdao.java

package com.ankit.student.dao;

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

import com.ankit.student.db.DBConnection;
import com.ankit.student.pojo.User;

/*
* Data Access Object Layer for the USER
*/
public void createUser(User user) throws Exception {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = DBConnection.getConnection();
if(con != null && !con.isClosed()) {
String query = "insert into user values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
stmt = con.prepareStatement(query);
stmt.setInt(1, 50);
stmt.setString(2, user.getName());
stmt.setString(3, user.getPassword());
stmt.setString(4, "admin");
stmt.setString(5, null);
stmt.setString(6, null);
stmt.setString(7, null);
stmt.setString(8, user.getName());
stmt.setString(9, user.getMobile());
stmt.setInt(10, Integer.parseInt(user.getAge()));
stmt.setString(11, user.getEmail());
stmt.setString(12, user.getUserDescription());
stmt.executeUpdate();
con.commit();
System.out.println("User Created Successfully");
} else {
throw new SQLException("%%%% ERROR IN GETTING CONNECTION WITH
DATABASE %%%%");
}
} catch (Exception e) {
throw e;
} finally {
DBConnection.closeAll(con, stmt, rs);
}
}

}
Coding :
DBConnection.java

package com.ankit.student.db;

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

public class DBConnection {

public static Connection getConnection() throws Exception {


Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver");
String connectionURL = "jdbc:mysql://localhost:3306/studentconnect";
String DBUserName = "root";
String DBPassword = "root";

con = DriverManager.getConnection(connectionURL, DBUserName,


DBPassword);
if(con != null && !con.isClosed()) {
return con;
} else {
throw new SQLException("%%%% ERROR IN GETTING
CONNECTION WITH DATABASE %%%%");
}

} catch(Exception e) {
throw e;
}
}
public static void closeAll(Connection con, PreparedStatement stmt, ResultSet rs)
{
try {
if(rs != null) {
rs.close();
}
if(stmt != null) {
stmt.close();
}
if(con != null) {
con.close();
}
} catch(Exception e) {
e.printStackTrace();
}
}

/**
* @param con
* @param stmt
*/
public static void closeConnection(Connection con, PreparedStatement stmt) {
try {
if(stmt != null) {
stmt.close();
}
if(con != null) {
con.close();
}
} catch(Exception e) {
e.printStackTrace();
}
}

public static void rollback(Connection con) {


try {
if(con != null) {
con.rollback();
}
} catch (SQLException ex) {
ex.printStackTrace();
}
}

}
Coding :
CreatelectureServlet.java

package com.ankit.student.servlet;

import java.io.IOException;
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 javax.servlet.http.HttpSession;

import com.ankit.student.action.CreateLectureAction;
import com.ankit.student.action.LoginAction;
import com.ankit.student.action.RegistrationAction;
import com.ankit.student.pojo.Lecture;
import com.ankit.student.pojo.User;

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

public CreateLectureServlet() {
super();
// TODO Auto-generated constructor stub
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
String destination = "createLecture.jsp";
String LectureName = request.getParameter("lectureName");
String Category = request.getParameter("category");
String lecture = request.getParameter("lecture");
HttpSession session = request.getSession(false);
CreateLectureAction action = new CreateLectureAction();
try {
action.PerformLecturePost(LectureName,Category,lecture);
response.sendRedirect(destination);
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect(destination);
}
}

}
Coding :
CreateLectureAction.java

package com.ankit.student.action;

import com.ankit.student.dao.LectureDao;
import com.ankit.student.pojo.Lecture;

public class CreateLectureAction {

public void PerformLecturePost(String lectureName,String category,String lecture) throws


Exception
{
validateLecturePost(lectureName,category,lecture);
Lecture getlecture = new Lecture();
getlecture.setLectureName(lectureName);
getlecture.setCategory(category);
getlecture.setLecture(lecture);
LectureDao dao = new LectureDao();
dao.createLecture(getlecture);

}
public void validateLecturePost(String LectureName,String Category,String lecture) throws
Exception {

if(LectureName != null && LectureName != "" ) {


throw new Exception("Not a valid Lecture Name");
}
if(lecture != null && lecture != "" ) {
throw new Exception("Not a valid Lecture");
}
}
}
Coding :
LectureDao.java

package com.ankit.student.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.ankit.student.db.DBConnection;
import com.ankit.student.pojo.Lecture;
import com.ankit.student.pojo.User;

public class LectureDao {


public Lecture getLectureDetails(String loginId) throws Exception {

Connection con = null;


PreparedStatement stmt = null;
ResultSet rs = null;
Lecture lecture = new Lecture();
try {
con = DBConnection.getConnection();
if(con != null && !con.isClosed()) {

String query = "select lecture_name, category, uploaded_by,


uploaded_date, lecture_description from lecture where login_id = ?";
stmt = con.prepareStatement(query);
stmt.setString(1, loginId);
rs = stmt.executeQuery();
while(rs.next()) {
lecture.setLectureName(rs.getString("lectureName"));
lecture.setCategory(rs.getString("category"));
lecture.setUploadedBy(rs.getString("uploadedBy"));
lecture.setUploadedDate(rs.getString("uploadedDate"));

lecture.setLectureDescription(rs.getString("lectureDescription"));
} else {
throw new SQLException("%%%% ERROR IN GETTING
CONNECTION WITH DATABASE %%%%");
}
} catch (Exception e) {
throw e;
} finally {
DBConnection.closeAll(con, stmt, rs);
}
return lecture;
}

public void createLecture(Lecture lecture) throws Exception{

Connection con = null;


PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = DBConnection.getConnection();
if(con != null && !con.isClosed()) {
String query = "insert into lecture values (?, ?, ?, ?, ?, ?)";
stmt = con.prepareStatement(query);
stmt.setInt(1, 3);
stmt.setString(2, lecture.getLectureName());
stmt.setString(3, lecture.getCategory());
stmt.setString(4, null);
stmt.setString(5, null);
stmt.setString(6, lecture.getLectureDescriotion());
stmt.executeUpdate();
con.commit();
System.out.println("Lecture Submitted Successfully");
} else {
throw new SQLException("%%%% ERROR IN GETTING
CONNECTION WITH DATABASE %%%%");
}
} catch (Exception e) {
throw e;
} finally {
DBConnection.closeAll(con, stmt, rs);
}
}

}
Coding :
CreateLectureAction.java

package com.ankit.student.servlet;

import java.io.IOException;
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 javax.servlet.http.HttpSession;

import com.ankit.student.action.LoginAction;
import com.ankit.student.pojo.User;

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

/**
* @see HttpServlet#HttpServlet()
*/
public WelcomeServlet() {
super();
// TODO Auto-generated constructor stub
}

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws


ServletException, IOException {
// TODO Auto-generated method stub
}

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws


ServletException, IOException {
String destination = "createLecture.jsp";
String CreateLecture = request.getParameter("CreateLecture");
HttpSession session = request.getSession(false);
try {

destination = "createLecture.jsp";
response.sendRedirect(destination);
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect(destination);
}
}
}
Coding :
ViewServlet.java

package com.ankit.student.servlet;

import java.io.IOException;
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 javax.servlet.http.HttpSession;

import com.ankit.student.action.LoginAction;
import com.ankit.student.action.ViewAction;
import com.ankit.student.pojo.Lecture;
import com.ankit.student.pojo.User;

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

/**
* @see HttpServlet#HttpServlet()
*/
public ViewServlet() {
super();
// TODO Auto-generated constructor stub
}

/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
String destination = "createLecture.jsp";
String lectureName = request.getParameter("lectureName");
String lectureDescription = request.getParameter("lectureDescription");
HttpSession session = request.getSession(false);
ViewAction action = new ViewAction();
try {
Lecture lecture = action.RetrieveLecture(lectureName, lectureDescription);
session.setAttribute("userName", lecture.getName());
session.setAttribute("lastLogin", lecture.getLastLogin());
destination = "welcomeUser.jsp";
response.sendRedirect(destination);
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect(destination);
}

/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
}

}
Coding :
ViewAction.java

package com.ankit.student.action;

import com.ankit.student.dao.ViewDao;
import com.ankit.student.pojo.Lecture;
import com.ankit.student.pojo.View;

public class ViewAction {

public Lecture RetrieveLecture(String lectureName, String lectureDescription ,String


Category ) throws Exception {
ViewDao viewDao = new ViewDao();
Lecture lecture = viewDao.getLectureDetails(lectureName);
if(lectureName != null) {
if(lectureName.equals(Lecture.getLectureName())) {
System.out.println("Lecture Retrieved Sucessfully");
} else {
System.out.println("Lecture Retrieved Failed");
throw new Exception ("No lecture Available");
}
}
return lecture;

}
}
Coding :
ViewAction.java

package com.ankit.student.dao;

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

import com.ankit.student.db.DBConnection;
import com.ankit.student.pojo.Lecture;
import com.ankit.student.pojo.User;

public class ViewDao {

public User getLectureDetails(String lectureName) throws Exception {

Connection con = null;


PreparedStatement stmt = null;
ResultSet rs = null;
Lecture lecture = new Lecture();
try {
con = DBConnection.getConnection();
if(con != null && !con.isClosed()) {

String query = "select Id, lecture_name , category ,


lecture_description from lecture where Id = ?";
stmt = con.prepareStatement(query);
stmt.setString(1, Id);
rs = stmt.executeQuery();
while(rs.next()) {
lecture.setLectureName(rs.getString("lecture_name"));

lecture.setLectureDescription(rs.getString("lecture_description"));
lecture.setCategory(rs.getString("category"));

}
} else {
throw new SQLException("%%%% ERROR IN GETTING
}
} catch (Exception e) {
throw e;
} finally {
DBConnection.closeAll(con, stmt, rs);
}
return user;
}

public void createUser(User user) throws Exception {


Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = DBConnection.getConnection();
if(con != null && !con.isClosed()) {
String query = "insert into user values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
stmt = con.prepareStatement(query);
stmt.setInt(1, 3);
stmt.setString(2, user.getName());
stmt.setString(3, user.getPassword());
stmt.setString(4, "admin");
stmt.setString(5, null);
stmt.setString(6, null);
stmt.setString(7, null);
stmt.setString(8, user.getName());
stmt.setString(9, user.getMobile());
stmt.setInt(10, Integer.parseInt(user.getAge()));
stmt.setString(11, user.getEmail());
stmt.setString(12, user.getUserDescription());
stmt.executeUpdate();
con.commit();
System.out.println("User Created Successfully");
} else {
throw new SQLException("%%%% ERROR IN GETTING CONNECTION WITH
DATABASE %%%%");
}
} catch (Exception e) {
throw e;
} finally {
DBConnection.closeAll(con, stmt, rs);
}
}
SCREEN-SHOTS
Index.jsp
registration.jsp
login.jsp
welcomeUser.jsp
CreateLecture.jsp
Admin.jsp
error.jsp
DataBase Columns, Row For Users:
DataBase Columns, Row For Blogs:

Design phase ER Diagrams and Data Flow Diagram :


Zero Level DFD

information
St I.D.
Call students OCM – Student
Regist-
ration system Process
Registration
nnnnn

Zero Level DFD

To understand the information requirement of Students , it is important to conceptualize how

data moves through the system , the process or transformations that the data undergo , and what

the outputs are . Data processes by college could be emphasised graphically through Data Flow

Diagram (DFD) to understand the logical underlying the system.

In the Zero level , the whole system is considered as one process that defines the main input and

outputs to that system without showing details of connections with database.

Testing and Test suits:


Unit Testing:
It was carried out simultaneously along with the coding of the system code modules. In this type
of testing:
 The module interface was tested to ensure that information properly flows into and out of
the program unit under test.
 The local data structures were examined to ensure that data stored temporarily maintains
its integrity during all steps in algorithm’s execution.
 Boundary conditions were tested to ensure that the module operates properly at
boundaries established to limit or restrict processing.
 All independent paths (basis paths) through the control structure were exercised to ensure
that all statements in a module have been executed at least once.
 All error-handling paths were tested.
The Main Menu and the other related code modules were used as respective driver and stubs for
the module under test consideration. The White-Box testing method of unit testing Control
Structure testing was used for developing the test cases for testing the different conditions, Data
Flows and Loops in each of the code modules.

System Testing
Systems testing is an expensive but critical process that can take as much as 50 percent of the
budget for program development. The common view of testing held by users is that it is
performed to prove that there are no errors in the program.
Testing is the process of executing a program with the explicit intention of finding errors that is,
making the program fail. A successful test, then, is one that finds an error.
 Test the modules thoroughly- cover all the access paths. Generate enough data to cover
all the access paths arising from conditions.
 Test the modules by passing wrong data.
 To test the different access paths, look at the conditional statement. Enter some data in
the test file, which would satisfy the condition and again test the script. Repeat this
process many times.
 After each test, analyze the log file to ensure proper, understandable and useful messages
are present in the log file.
 Test for locking by invoking multiple concurrent processes.
Future Perspectives :

 The home page to consist of attractive essential features like: most read articles, editor’s
pick, recently posted articles, highest rated articles, article of the month, college news,
etc.
 Archives to be maintained.
 Interactive feedback to be supported to enhance the user experience.
 Prevent standard automated software from filling out a form.
 Categorizing Posts And Registered members on basis of most read articles and most
Active user respectively
References:

 Cornell JAVA SE 6
 HeadFirst for Servlets and JSP

You might also like