The JSP project is based on Social Media websites like Facebook, Twitter where user can post, comment, make friends and express their feeling. The project is build upon JSP, Servlet, Java, MySQL, Tomcat Server, HTML and BootStrap. The Student can modify the project with their own ideas to meet their requirements. 
The project working is like where we can send Post, Comment on Post, Send Friend request, Delete user where it has the ability to automatically delete all the posts, comments, friend requests of the delete user.
Software Required:
The project is made using Eclipse IDE and MySQL Server. Following are the requirements.
  1. Eclipse JAVA IDE 
  3. JDBC Connector for database
  4. TomCat Server
Statements for creating database and tables in MySQL:
  • In this project the database have the name : CipherBooK
Following are the Tables:
  • users (uid, uname, uemail, upass, udob, ugender, uloc, uimage);
create table users(
uid int unsigned not null primary key auto_increment,
uname varchar(30) not null,
uemail varchar(60) not null,
upass varchar(30) not null,
udob date null,
ugender enum('Male','Female') not null,
uloc varchar(30) not null,
uimage blob 
  • posts (pid, uid, ptitle, pbody, pdate);
create table posts(
pid int unsigned not null primary key auto_increment,
uid int unsigned not null,
ptitle varchar(30) not null,
pbody text not null,
pdate date not null,
constraint fk_user foreign key(uid) references users(uid) 
on delete cascade 
on update cascade
  • relationship (user_one_id, user_two_id, status, action_user_id);
CREATE TABLE relationship(
user_one_id INT NOT NULL REFERENCES Users(uid) on delete cascade on update cascade,
user_two_id INT NOT NULL REFERENCES Users(uid) on delete cascade on update cascade,
status INT NOT NULL default 0,
action_user_id INT NOT NULL,
CONSTRAINT CheckOneWay CHECK (user_one_id < user_two_id),
CONSTRAINT UQ_Friends_Pairs UNIQUE (user_two_id, user_one_id),
CONSTRAINT PK_Friends_Pairs PRIMARY KEY (user_one_id, user_two_id)
  • comments( cid, uid, pid, cbody, cdate)
create table comments(
cid int unsigned not null primary key auto_increment,
pid int unsigned not null,
uid int unsigned not null,
cbody text not null,
cdate date not null,
constraint fk_post foreign key(pid) references posts(pid) 
on delete cascade on update cascade
Download the Project and extract it.
  1. The in Eclipse File-> New -> Dynamic Web Project.
  2. Select the target runt me as Tomcat Folder and keep the Dynamic web module version as 3.0
  3. Copy the files as per Folders are given in the project.
  4. Download and Copy the JAR file in WEB-INF -> lib folder.
Tips for errors:
  1. Make sure that Apache Tomcat server in check in eclipse Properties -> Targeted Runtime
  2. Change Build Path JRE System Library in Properties -> Java Build Path
  3. Import the packages

This Image will help you to organize the files and packages(Folders).

After Reading the whole boring stuff here is the download(Make sure you read it, It's Important) Click here to download free projectSocial media project using JSP, Servlet, Java, MySQL and Bootstrap