Вы находитесь на странице: 1из 104

LEAD MANAGEMENT SYSTEM

Group Members:
Saurabh kumar, Heritage institute of technology,141260110588
Aman Kumar, Heritage institute of technology ,141260110011
Ranjeet Kumar Anand, Heritage institute of technology, 141260110072
Aditya Kumar Dwivedi, Heritage institute of technology,141260110004
Swetank, Heritage institute of technology,141260110118

Table Of Contents
Acknowledgement......................................................................................................
Project Objective.........................................................................................................
Project Scope...............................................................................................................
Requirement Specification..........................................................................................
Database Design..........................................................................................................
Application Work Flow................................................................................................
Screenshots.................................................................................................................
Future Scope Of Improvements..................................................................................
Code............................................................................................................................
Certificate...................................................................................................................

Acknowledgement
I take this opportunity to express my profound gratitude and deep
regards
to my faculty (Mr.Titas Roy Chowdhary) for his exemplary guidance,
monitoring and constant encouragement throughout the course of this
project. The blessing, help and guidance given by him 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.

(SAURABH KUMAR )

Project Objective:
Developing and implementing a web based Lead Management System
help Centre Manger and the Councillor to give a detailed description of
the analysis and requirements for the system to be automated, i.e. to
provide the enquiry and admission process in a digital form thus enabling
worldwide access and a global approach.
The primary project goals consist of:
Globalizing and bringing the entire and process of Counselling and
Admission Online.
Providing Centre Manager an easy to understand Web approach.
Channelizing and Separation of entire process to enable easy track
and redressal of students enquiries.
Last but not the least it is future proof as we would be providing
important patches and updates as and so necessary and beyond
human errors.

Project Scope:
The system will be available on an online platform for 24x7 access
To the Admin and Councilors.
The system will support online registering of new Councilors and
new enquiries and follow up etc.
This system provides competitive pricing that Students will gain a
better value for money.
The system will provide interaction between students and councilors
and hence Central manager
The system will provide social interaction tools such as Chats,
Forums, Link Share, and Broadcast etc., to enable out-of-class
interaction amongst students, the faculty and the administration.

Requirement Specification:
Domain Description
Lead Management System is used to control a large number of
database. There are many problems which are faced by people while
offline online Counselling. There are no guarantee of the
genuineness of the enquiries in offline counselling procedures. This
is the advantage in online Lead Management. Here all the councilors
are already registered and can be claimed or praised by Centre
Manager, if there is a fault in the enquiries they produce they can be
promoted or penalized thus maintaing healthy competition in
system.

Problem Definition
This system has many flaws as a huge organization need a large
number of database. The following points are given below:
Its difficult to find which is better and with lesser amount
Quality of enquiry cannot be predicted up to the mark
Barriers to communication between managers and the students
Use of unfair means to increase per enquiry basis income is
restricted.
Competitive environment can be extremely beneficial for
students and the institution alike

Functional Requirement
Admin can perform the following function:
Can create a new Course
Can register a new Councilor
Can view Enquiry List
Can follow the status of each enquiry
Councilors can perform the following functions:

Can create new enquiry and view details of any enquiry made.
Follow up the enquiry with proper record maintenance.
Can generate bill of students against a particular enquiry.
Can change the status of the enquiry and update follow-ups of
any enquiry.

Hardware/Software Requirements:
THREE TIER SYSTEM
1. Server Side:

Hardware Requirements:
Multiprocessing System(16 core)
64 GB RAM with RAID System
Software Requirements:
Server OS(Windows-2012/Unix)
2.Middle Tier:
Hardware Requirements:
Multiprocessing System(16 core)
64 GB RAM with RAID System
Software Requirements:
Server OS Application Server(Wildfly Application
Server)
3.Client Side:
Hardware/Software Requirements
Any PC or Laptop with a built-in browser

Entity-Relationship Diagram (ERD):

Database Design:

Enquiry Table:Field

Type

Null

cid
edate
sname
semail
sphone
saddress
crsname
estatus
comment

int(4)
int(4)
varchar(20)
varchar(20)
varchar(20)
varchar(20)
varchar(20)
varchar(20)
varchar(20)

NO
NO
YES
YES
YES
YES
YES
YES
YES

Key Default Extra


PRI

NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL

Auto-increment

Followup Table :Field

Type

Null

enqid

int(4)

NO

fid

int(4)

NO

fdate

varchar(20) YES

comment varchar(20) YES

Key

Default Extra
NULL

PRI

NULL

Auto_increment

Course Table :
Field

Type

Null

Key

Default Extra

crsid
crsname
crsduration
crsdetails

int(4)
varchar(20)
varchar(20)
varchar(20)

NO
YES
YES
YES

PRI

NULL

Auto_increment

Follow-up Table :
Field

Type

Null Key Default

Extra

cid

int(4)

NO

auto_increment

cname

varchar(20)

YES

NULL

cemail

varchar(20)

YES

NULL

cpassword

varchar(20)

YES

NULL

PRI

NULL

Application Work Flow:Add New Course

Add New
Councilor
Centre Manager
View All
Admission

View Followup
Login
Add New Enquiry

Followup/Update
Enquiry
Councilor
View All
Admission

Billing Process

Screenshots :Welcome Screen :-

Add New Councilor:-

Add New Course:-

Insert New Enquiry:-

Billing Process:-

Future Scope Of Improvements:Even though the project was completed to the original
requirements, there are few features that we could add and
improve on, if time allowed. The file system implementation
should be revised. We could look at other DBMS file systems to
get a better idea on how to design a more efficient and space
conserving system.
Security is one of the main feature of the system. In this some
security measures are taken to avoid the mishandling of the
database. We can check for many other options can be added like
forgot password, change password etc.
Following Bullets Encapsulates Future Scopes In a Nutshell: We can add more powerful security to system and many
more features.
Student Login Portal For Online Enquiries related to
availability of seats.
Multi-linguistic website design
Online Doubt Removal System

Online Video Course


Feedback System

Code:
Index.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<img alt="logo" src="a.jpg" height = 80px width = 80px>
<center><font size = 8 color = black>Lead Management
System</font></center>
<hr>
<hr size = 36 noshade><br>
<br>
<%
String t=(String)session.getAttribute("ERROR");
%>
<h2><%=t %></h2>

<center><font size = 7 ><b>WELCOME</b></font></center>


<font size = 4 color = red ><b><I> Login As:</I></b></font><br>
<ul>
<a href="CenterManager.jsp"> <li><font size = 5 color =
black> Center Manager</font></li></a>
<br>
<a href="csr.jsp"><li><font size = 5 color = black>
Councilor</font></li></a>
</ul>
<br>
<br>
<br>
<br>
<br>
<br>
<hr width = 200 >
<center><I>HERITAGE INSTITUTE OF TECHNOLOGY,KOLKATA<br>
phone +91 9123555555 </I></p></center>
</body>
</html>

Centre Manage.jsp
<%@ page language="java" contentType="text/html;
charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor= lightblue>
<form action="CmloginServlet" method="post">
<font size = 6 color = black>Login As Center Manager</font><br>
<hr size = 20 noshade>
<br>
<font size = 3 >Username</font><input type="text"
name="username"><br>
<br>
<font size = 3 >Password</font><input type="password"
name="password"><br>
<br>
<input type ="submit" value="Login">
</form>
</body>
</html>

Cmloginservlet.java
package org.servlet;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
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 javax.servlet.http.HttpSession;
/**
* Servlet implementation class CmloginServlet
*/
@WebServlet("/CmloginServlet")
public class CmloginServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public CmloginServlet() {
super();
// TODO Auto-generated constructor stub
}
/**

* @see HttpServlet#doGet(HttpServletRequest request,


HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
String cmname=request.getParameter("username");
String pass=request.getParameter("password");
if(cmname.equals("admin")&&
pass.equals("password"))
{
HttpSession session=request.getSession(true);
session.setAttribute("CM", "Ranjeet");
String t=new
SimpleDateFormat("HH:mm:ss").format(Calendar.getInstance().ge
tTime()) ;
session.setAttribute("TIME", t);
//RequestDispatcher
rd=request.getRequestDispatcher("CmViewServlet.jsp");
//rd.forward(request,response);

response.sendRedirect("CmViewServlet.jsp");
}
else
{
}
}
}

response.sendRedirect("error.html");

Cmviewservlet.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<% String name=(String)session.getAttribute("CM");
String t=(String)session.getAttribute("TIME");
%>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("CM")==null)
response.sendRedirect("index.jsp");
%>
<font size = 6 >Logged In :<%=name %></font>
<p align = right>Login Time :<%=t %></h2>
<p align = right><a href="Logoutservletcm"><font color =
blue>Logout</font></a></p>

<hr size = 20 noshade>


<br>
<ul>
<a href="addnewcourse.jsp"><li>Add New Course</li></a><br>
<a href="Seeallcourse"><li>List Of All Courses</li></a><br>
<a href="Seeallenquirywithoutcid"><li>List of All
Enquiry</li></a><br>
<a href="addnewcouncilor.jsp"><li>Add New
Councilor</li></a><br>
<a href="Seeallcouncilor"><li>List Of Councilors</li></a><br>
<a href="Seealladmittedcm"><li>List Of Admitted
Students</li></a><br>
</ul>
</body>
</html>

Addnewcourse.jsp
<%@ page language="java" contentType="text/html;
charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<% String name=(String)session.getAttribute("CM");
String t=(String)session.getAttribute("TIME");
%>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("CM")==null)
response.sendRedirect("index.jsp");
%>
<font size = 6 >Logged In :<%=name %></font>
<p align = right>Login Time :<%=t %></p>

<p align = right><a href="Logoutservletcm"><font color =


blue>Logout</font></a></p>
<br>
<hr size = 20 noshade>
<br>
<center><font size = 5>Add New Course</font></center>
<hr width = 200>
<br>
<form action="addnewcourse" method="post">
Course Name<input type ="text" name="crsname"
required><br><br>
Course Duration<input type ="text" name="crsduration"
required><br><br>
Course Fee<input type="number" name="crsfee" min="0"
required><br><br>
<input type ="hidden"name="cmname" value =<%= name%>/>
Course Details<input type ="text" name="crsdetails"
required><br><br>
<p><input type="submit" value="Submit" /></p>

</body>
</html>

Seeallcourse.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
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 javax.servlet.http.HttpSession;
/**
* Servlet implementation class Seeallcourse
*/
@WebServlet("/Seeallcourse")
public class Seeallcourse extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Seeallcourse() {
super();
// TODO Auto-generated constructor stub
}
/**

* @see HttpServlet#doGet(HttpServletRequest request,


HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
try {

HttpSession session=request.getSession(true);
DataAccess da=new DataAccess();
ArrayList<Course> list=da.getAllCourse();
if (list != null) {
session.setAttribute("SEEALLCOURSE",list);
//RequestDispatcher rd =
request.getRequestDispatcher("seeallcourse.jsp");
//rd.forward(request, response);
response.sendRedirect("seeallcourse.jsp");
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
}}

Seeallcourse.jsp
<%@ page language="java" contentType="text/html;
charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<% String name=(String)session.getAttribute("CM");
String t=(String)session.getAttribute("TIME");
%>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("CM")==null)
response.sendRedirect("index.jsp");
%>
<font size = 5>Logged In :<%=name %></font>

<p align = right>Login Time :<%=t %></p>


<p align = right><a href="Logoutservletcm"><font color
=blue>Logout</font></a></p>
<br>
<hr size = 20 noshade><br>
<br>
<table border=1>
<%ArrayList<Course>
list=(ArrayList<Course>)session.getAttribute("SEEALLCOURSE");
if(list==null)
{%>
<h1>No course In database...</h1>
<a href="addnewcourse.jsp"><li>Add New
Course</li></a>
<%}else{%>
<h1>Available courses :</h1>
<tr><td>Course Id</td><td>Course
name</td><td>Course duration</td><td>Course
fee</td><td>Course details</td></tr>
<%for(Course e:list)
{%>
<tr><td><%=e.getCrsid() %></td><td><%=e.getCrsname()%>
</td><td><%=e.getCrsduration() %></td><td><%=e.getCrsfee()%
></td><td><%=e.getCrsdetails()%></td>
<% }%>
<%}%>

</body>
</html>

</table>
<a href="CmViewServlet.jsp">Back</a>

Seeallenquirywithoutcid.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
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 javax.servlet.http.HttpSession;
/**
* Servlet implementation class Seeallenquirywithoutcid
*/
@WebServlet("/Seeallenquirywithoutcid")
public class Seeallenquirywithoutcid extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Seeallenquirywithoutcid() {
super();
// TODO Auto-generated constructor stub
}
/**

* @see HttpServlet#doGet(HttpServletRequest request,


HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
try {

HttpSession session=request.getSession(true);
DataAccess da=new DataAccess();
ArrayList<Enquiry>list
=da.getallenquirywithoutcid();
if (list != null) {
session.setAttribute("SEEALLENQUIRYWITHOUTCID",list);
//RequestDispatcher rd =
request.getRequestDispatcher("seeallenquirywithoutcid.jsp");
//rd.forward(request, response);
response.sendRedirect("seeallenquirywithoutcid.jsp");
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/

protected void doPost(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
}
}

Seeallenquirywithoutcid.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<% String name=(String)session.getAttribute("CM");
String t=(String)session.getAttribute("TIME");
%>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("CM")==null)
response.sendRedirect("index.jsp");
%>
<font size=5>Logged In :<%=name %></font>
<p align = right>Login Time :<%=t %></p>

<p align = right><a href="Logoutservletcm">Logout</a></p><br>


<br>
<hr size = 20 noshade><br>
<table border=1>

<% ArrayList<Enquiry>
list=(ArrayList<Enquiry>)session.getAttribute("SEEALLENQUIRYWI
THOUTCID");
if(list==null)
{%>
<h1>NO Enquiry To View...</h1>
<%}else{%>
<tr><td>Enquiry Id</td><td>Councilor
Cid</td><td>Date</td><td>Student Name</td><td>Student
Email</td><td>Phone</td>
<td>Address</td><td>Course</td><td>Current
Status</td><td>Comment</td>
<%for(Enquiry e:list)
{%>

<tr><td><%=e.getEnqid()%></td><td><%=e.getCid()%></td>
<td><%=e.getEdate()%></td><td><%=e.getSname()%></td><td><
%=e.getSemail()%></td><td><%=e.getSphone()%></td>
<td><%=e.getSaddress()%></td><td><%=e.getCrsname()%><
/td><td><%=e.getEstatus()%></td><td><%=e.getComment()%></
td>

<td><a
href="Followupservletcm?enqid=<%=e.getEnqid()%>">Follow
Up</a></td></tr>
<% }%>
<%}%>
<a href="CmViewServlet.jsp">Back</a>
</table>
</body>
</html>

Seeallcouncilor.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
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 javax.servlet.http.HttpSession;
/**
* Servlet implementation class Seeallcouncilor
*/
@WebServlet("/Seeallcouncilor")
public class Seeallcouncilor extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Seeallcouncilor() {
super();
// TODO Auto-generated constructor stub
}
/**

* @see HttpServlet#doGet(HttpServletRequest request,


HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
try {

HttpSession session=request.getSession(true);
DataAccess da=new DataAccess();
ArrayList<Councilor> list=da.getAllCouncilor();
if (list != null) {

session.setAttribute("SEEALLCOUNCILOR",list);
//RequestDispatcher rd =
request.getRequestDispatcher("seeallcourse.jsp");
//rd.forward(request, response);
response.sendRedirect("seeallcouncilor.jsp");
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/

protected void doPost(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
IOException {
}
}

Seeallcouncilor.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<% String cmname=(String)session.getAttribute("CM");
String t=(String)session.getAttribute("TIME");
%>
<font size = 5>Logged In :<%=cmname %></font>
<p align = right>Login Time :<%=t %></p>
<p align = right> <a href="Logoutservletcm">Logout</a></p>
<br>
<br>
<hr size = 20 noshade>
<br>
<center><I>list of all councilors</I></center>
<hr width = 200>
<table border=1>

<% ArrayList<Councilor>
list=(ArrayList<Councilor>)session.getAttribute("SEEALLCOUNCILO
R");
if(list==null)
{%>
<h1>NO Entry For Councilor...%><a
href="addnewcouncilor.jsp">Click Here To Create a New
Councilor</a></h1>
<%}else{%>
<tr><td>Concilor Id</td><td>Councilor
Name</td><td>Councilor Email</td><td>Enquiry List</td></tr>
<%for(Councilor c:list)
{%>

<tr><td><%=c.getCid()%></td><td><%=c.getCname()%></td
><td><%=c.getCemail()%></td><td><a
href="Seeallenquirycm?cid=<%=c.getCid()%>">Enquiry
List</a></td>

</html>

<%} }%>
<a href="CmViewServlet.jsp">Back</a>
</table>
</body>

Addnewcouncilor.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<% String name=(String)session.getAttribute("CM");
String t=(String)session.getAttribute("TIME");
%>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("CM")==null)
response.sendRedirect("index.jsp");
%>
<font size = 5>Logged In :<%=name %></font>
<p align = right>Login Time :<%=t %></p><br>
<p align = right><a href="Logoutservletcm">Logout</a></p>
<center><I>enter councilor detail</I></center>

<hr width = 200>


<br>
<form action="Addnewcouncilor" method="post">
<font size = 3>Councilor Name</font><input type ="text"
name="cname" required><br><bR>
<font size = 3>Councilor Email Id</font><input type ="email"
name="cemail" required><br><bR>
<font size = 3>Councilor Password</font><input type
="password" name="cpassword" required><br><br>
<input type ="hidden"name="cmname" value =<%=
name%>/><br>

<input type="submit" value=" Submit New Councilor Details" />


</form>
</body>
</html>

Seeallcouncilor.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
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 javax.servlet.http.HttpSession;
/**
* Servlet implementation class Seeallcouncilor
*/
@WebServlet("/Seeallcouncilor")
public class Seeallcouncilor extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Seeallcouncilor() {
super();
// TODO Auto-generated constructor stub
}
/**

* @see HttpServlet#doGet(HttpServletRequest request,


HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
try {

HttpSession session=request.getSession(true);
DataAccess da=new DataAccess();
ArrayList<Councilor> list=da.getAllCouncilor();
if (list != null) {

session.setAttribute("SEEALLCOUNCILOR",list);
//RequestDispatcher rd =
request.getRequestDispatcher("seeallcourse.jsp");
//rd.forward(request, response);
response.sendRedirect("seeallcouncilor.jsp");
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/

protected void doPost(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
IOException {
}
}
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<% String cmname=(String)session.getAttribute("CM");
String t=(String)session.getAttribute("TIME");
%>
<font size = 5>Logged In :<%=cmname %></font>
<p align = right>Login Time :<%=t %></p>
<p align = right> <a href="Logoutservletcm">Logout</a></p>
<br>
<br>

<hr size = 20 noshade>


<br>
<center><I>list of all councilors</I></center>
<hr width = 200>
<table border=1>

<% ArrayList<Councilor>
list=(ArrayList<Councilor>)session.getAttribute("SEEALLCOUNCILO
R");
if(list==null)
{%>
<h1>NO Entry For Councilor...%><a
href="addnewcouncilor.jsp">Click Here To Create a New
Councilor</a></h1>
<%}else{%>
<tr><td>Concilor Id</td><td>Councilor
Name</td><td>Councilor Email</td><td>Enquiry List</td></tr>
<%for(Councilor c:list)
{%>

<tr><td><%=c.getCid()%></td><td><%=c.getCname()%></td
><td><%=c.getCemail()%></td><td><a
href="Seeallenquirycm?cid=<%=c.getCid()%>">Enquiry
List</a></td>

<%} }%>

</html>

<a href="CmViewServlet.jsp">Back</a>
</table>
</body>

Seealladmittedcm.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
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;
/**
* Servlet implementation class Seealladmiitedcm
*/
@WebServlet("/Seealladmittedcm")
public class Seealladmittedcm extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Seealladmittedcm() {
super();
// TODO Auto-generated constructor stub
}
/**

* @see HttpServlet#doGet(HttpServletRequest request,


HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
HttpSession session = request.getSession();
DataAccess da;
try {
da = new DataAccess();
ArrayList<Enquiry> list=da.getAllAdmittedcm();
session.setAttribute("SEEALLENQUIRY",list);
//RequestDispatcher rd =
request.getRequestDispatcher("seeallenquiry.jsp");
//rd.forward(request, response);
response.sendRedirect("seealladmittedcm.jsp");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
}
}

Seealladmittedcm.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("CM")==null)
response.sendRedirect("index.jsp");
%>
<% String cmname=(String)session.getAttribute("CM");
String t=(String)session.getAttribute("TIME");
%>
<font size =5>Logged In :<%=cmname %></font>

<p align = right> Login Time :<%=t %></p>


<p align = right> <a
href="Logoutservletcm">Logout</a></p><br>
<hr size = 20 noshade><br>
<table border=1>

<% ArrayList<Enquiry>
list=(ArrayList<Enquiry>)session.getAttribute("SEEALLENQUIRY");
if(list==null)
{%>
<h1>NO Students Admited...</h1>
<%}else{%>
<tr><td>Enquiry Id</td><td>Councilor
Cid</td><td>Date</td><td>Student Name</td><td>Student
Email</td><td>Phone</td>
<td>Address</td><td>Course</td><td>Current
Status</td><td>Comment</td>
<%for(Enquiry e:list)
{%>

<tr><td><%=e.getEnqid()%></td><td><%=e.getCid()%></td>
<td><%=e.getEdate()%></td><td><%=e.getSname()%></td><td><
%=e.getSemail()%></td><td><%=e.getSphone()%></td>
<td><%=e.getSaddress()%></td><td><%=e.getCrsname()%><
/td><td>Admitted</td><td><%=e.getComment()%></td>
<%}%>

</html>

<%} %>
<a href="CmViewServlet.jsp">Back</a>
</table>
</body>

Logoutservletcm.java
package org.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;
/**
* Servlet implementation class Logoutservlet
*/
@WebServlet("/Logoutservletcm")
public class Logoutservletcm extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Logoutservletcm() {
super();
// TODO Auto-generated constructor stub
}

/**
* @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
HttpSession session = request.getSession(false);
if(session != null)
{session.setAttribute("CM", null);
// session.invalidate();
}
//request.getRequestDispatcher("/index.html").forward(req
uest,response);
session.setAttribute("ERROR","Please Login Again...");
response.sendRedirect("index.jsp");
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
}
}

Index.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<img alt="logo" src="a.jpg" height = 80px width = 80px>
<center><font size = 8 color = black>Lead Management
System</font></center>
<hr>
<hr size = 36 noshade><br>
<br>
<%
String t=(String)session.getAttribute("ERROR");
%>
<h2><%=t %></h2>
<center><font size = 7 ><b>WELCOME</b></font></center>
<font size = 4 color = red ><b><I> Login As:</I></b></font><br>
<ul>

<a href="CenterManager.jsp"> <li><font size = 5 color =


black> Center Manager</font></li></a>
<br>
<a href="csr.jsp"><li><font size = 5 color = black>
Councilor</font></li></a>
</ul>
<br>
<br>
<br>
<br>
<br>
<br>
<hr width = 200 >
<center><I>HERITAGE INSTITUTE OF TECHNOLOGY,KOLKATA<br>
phone +91 9123555555 </I></p></center>
</body>
</html>

Addnewenquiry.jsp
<%@ page language="java" contentType="text/html;
charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<%
Councilor c=(Councilor)session.getAttribute("COUNCILOR");
String t=(String)session.getAttribute("TIME");
%>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("COUNCILOR")==null)
response.sendRedirect("index.jsp");
%>

<h2>Logged In :<%=c.getCname() %></h2>


<p align = right >Login Time :<%=t %></p><br>
<p align = right ><a href="Logoutservletcr">Logout</a></p>
<br>
<hr size = 20 noshade>
<br>
<center><font size = 4><I>ENTER STUDENT
DETAILS</I></font></center><br>
<form action="InsertnewEnquiry" method="post">
<font size = 3>STUDENT NAME :</font><input type ="text"
name="sname" required><br><br>
<font size = 3>EMAIL
:</font><input type="email"
name="semail" required><br><br>
<font size = 3>PHONE
:</font><input type="number" min="0"
placeholder="+91-xxx-xxxx-xxx" name="sphone" maxlength="12"
required/><br><br>
<font size = 3>ADDRESS :</font><input type="text"
name="saddress" required><br><br>
<h2><I>Select Course</I></h2>
<select name="crsname">
<%ArrayList<String>
clist=(ArrayList<String>)session.getAttribute("COURSENAME");%>
<%for(String cr:clist){ %>
<option><%=cr %> </option>
<%} %>
</select><br>
<hr width =300><br>
<font size = 3>Status :</font><input type="text"
name="estatus" required/><br><br>
<font size = 3>comment :</font><input type="text"
name="comment" required/><br>

<input type="hidden" name="cid" value=<%=c.getCid()%> /><br>


<input type="hidden" name="cname" value=<%=c.getCname()%>
/>
<input type="submit" value="submit Enquiry" />
</form>
</body>
</html>

Insertnewenquiry.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
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;
/**
* Servlet implementation class InsertnewEnquiry
*/
@WebServlet("/InsertnewEnquiry")
public class InsertnewEnquiry extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public InsertnewEnquiry() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse response)

*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
HttpSession session = request.getSession(true);
Councilor
c=(Councilor)session.getAttribute("COUNCILOR");
String sname=request.getParameter("sname");
String email=request.getParameter("semail");
String phone=request.getParameter("sphone");
String address=request.getParameter("saddress");
String course=request.getParameter("crsname");
String status=request.getParameter("estatus");
String comment=request.getParameter("comment");
String
edate=SimpleDateFormat.getDateInstance().format(System.curre
ntTimeMillis());
Enquiry e=new
Enquiry(c.getCid(),edate,sname,email,phone,address,course,statu
s,comment);

try {

DataAccess da=new DataAccess();


da.insertenquiry(e);
response.sendRedirect("insertsuccess.jsp");
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}

Insertsuccess.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor =lightblue>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("COUNCILOR")==null)
response.sendRedirect("index.jsp");
%>
<%
Councilor c=(Councilor)session.getAttribute("COUNCILOR");
String t=(String)session.getAttribute("TIME");%>
<font size = 5>Logged In :<%=c.getCname() %></font>
<p align = right > Login Time :<%=t %></p><br>

<p align = right ><a href="Logoutservletcr">logout</a></p><br>


<hr size = 20 noshade>
<br>
<br>
<hr width = 200>
<center><I>Insertion Successful</I></center><br>
<br>
<center><a href="CsrViewServlet.jsp">Back</a></center>
</body>
</html>

Seeallenquiry.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
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 javax.servlet.http.HttpSession;
/**
* Servlet implementation class seeallenquiry
*/
@WebServlet("/seeallenquiry")
public class seeallenquiry extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public seeallenquiry() {
super();
// TODO Auto-generated constructor stub
}
/**

* @see HttpServlet#doGet(HttpServletRequest request,


HttpServletResponse
* response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
HttpSession session = request.getSession();
Councilor c=(Councilor)session.getAttribute("COUNCILOR");
try {
DataAccess da = new DataAccess();
ArrayList<Enquiry> list =
da.getAllEnquiry(c.getCid());
session.setAttribute("SEEALLENQUIRY",list);
//RequestDispatcher rd =
request.getRequestDispatcher("seeallenquiry.jsp");
//rd.forward(request, response);
response.sendRedirect("seeallenquiry.jsp");
} catch (SQLException e1) {

e1.getMessage();

/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse
* response)
*/

protected void doPost(HttpServletRequest request,


HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
}
}

Seeallenquiry.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("COUNCILOR")==null)
response.sendRedirect("index.jsp");
%>
<% Councilor c=(Councilor)session.getAttribute("COUNCILOR");
String t=(String)session.getAttribute("TIME");
%>
<font size =5>Logged In :<%=c.getCname() %></font>
<p align = right> Login Time :<%=t %></p>
<p align = right> <a href="Logoutservletcr">Logout</a></p><br>

<hr size = 20 noshade><br>


<table border=1>

<% ArrayList<Enquiry>
list=(ArrayList<Enquiry>)session.getAttribute("SEEALLENQUIRY");
if(list==null)
{%>
<h1>NO Entry For cid=<%=c.getCid()%></h1>
<%}else{%>
<tr><td>Enquiry Id</td><td>Councilor
Cid</td><td>Date</td><td>Student Name</td><td>Student
Email</td><td>Phone</td>
<td>Address</td><td>Course</td><td>Current
Status</td><td>Comment</td>
<%for(Enquiry e:list)
{%>

<tr><td><%=e.getEnqid()%></td><td><%=e.getCid()%></td>
<td><%=e.getEdate()%></td><td><%=e.getSname()%></td><td><
%=e.getSemail()%></td><td><%=e.getSphone()%></td>
<td><%=e.getSaddress()%></td><td><%=e.getCrsname()%><
/td><td><%=e.getEstatus()%></td><td><%=e.getComment()%></
td>
<% if(e.getEstatus().equalsIgnoreCase("Ready To
Admit")){%>
<td><a
href="Generatebillservlet?enqid=<%=e.getEnqid()%>&sname=<%

=e.getSname()%>&sphone=<%=e.getSphone()%>">Generate
Bill</a></td>
<%} else{%>
<td><a
href="Followupservletcr?enqid=<%=e.getEnqid()%>">Follow
Up</a></td></tr>
<% }%>
<%}%>

</html>

<%} %>
<a href="CsrViewServlet.jsp">Back</a>
</table>
</body>

Generatebillservlet.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
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 javax.servlet.http.HttpSession;
/**
* Servlet implementation class generatefeeservlet
*/
@WebServlet("/Generatebillservlet")
public class Generatebillservlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Generatebillservlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse response)

*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
int
enqid=Integer.parseInt(request.getParameter("enqid"));
String sname=request.getParameter("sname");
String sphone=request.getParameter("sphone");
Enquiry e=new Enquiry(enqid,sname,sphone);
try {
HttpSession session=request.getSession(true);
DataAccess da= new DataAccess();
Course c=da.generatebill(enqid);
if (c != null) {
session.setAttribute("COURSE",c);
session.setAttribute("ENQUIRY", e);
//RequestDispatcher rd =
request.getRequestDispatcher("generatebill.jsp");
//rd.forward(request, response);
response.sendRedirect("generatebill.jsp");
}
else
System.out.println("###################nullll$$$$$$$$$"
+enqid+sname+sphone);
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}

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

Generatebill.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<%@ page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("COUNCILOR")==null)
response.sendRedirect("index.jsp");
%>
<% Councilor c=(Councilor)session.getAttribute("COUNCILOR");
String t=(String)session.getAttribute("TIME");%>
<font size = 5>Logged In :<%=c.getCname() %></font>
<p align = right >Login Time :<%=t %></p><br>

<p align = right ><a href="Logoutservletcr">Logout</a></p><br>


<hr size = 20 noshade>
<br>
<%Course cr=(Course)session.getAttribute("COURSE");
Enquiry e=(Enquiry)session.getAttribute("ENQUIRY");%>
<center><h1>Bill for
Student :<%=e.getSname() %></h1></center>
<br>
<hr width = 200 ><br>
<table border=1>
<%
if(c==null)
{%>
<h1>NO Entry For Enquiry Id=<%=e.getEnqid()%></h1>
<%}else{%>
<tr><td>Student
Name</td><td>Phone</td><td>Course Id</td><td>Course
Name</td><td>Date</td>
<td>Course Duration</td><td>Course
Details</td><td>Course Fee</td></tr>
<tr><td><%=e.getSname()%></td><td><%=e.getSphone() %
></td><td><%=cr.getCrsid()%></td><td><%=cr.getCrsname() %><
/td><td><%=SimpleDateFormat.getDateInstance().format(System
.currentTimeMillis()) %></td>
<td><%=cr.getCrsduration() %></td><td><%=cr.getCrsdetails
() %></td><td><%=cr.getCrsfee() %></td></tr>
<%} %>
<p align = right ><a href="seeallenquiry">Back</a></p>
</table>
</body>

</html>

Followupservletcr.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
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 javax.servlet.http.HttpSession;
/**
* Servlet implementation class followup
*/
@WebServlet("/Followupservletcr")
public class FollowupServletcr extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public FollowupServletcr() {
super();
// TODO Auto-generated constructor stub
}
/**

* @see HttpServlet#doGet(HttpServletRequest request,


HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
String senqid=request.getParameter("enqid");
int enqid = Integer.parseInt(senqid);
try {

HttpSession session=request.getSession(true);
DataAccess da=new DataAccess();
ArrayList<Followup> list=da.followupc(enqid);

session.setAttribute("FOLLOWUPENQUIRY",list);
session.setAttribute("ENQUIRYID",enqid);
// RequestDispatcher rd =
request.getRequestDispatcher("followupcr.jsp");
// rd.forward(request, response);
response.sendRedirect("followupcr.jsp");
} catch (SQLException e1) {

e1.getMessage();

/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)

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

Folowupcr.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("COUNCILOR")==null)
response.sendRedirect("index.jsp");
%>
<p align = right ><a href="Logoutservletcr">Logout</a></p><br>
<hr size = 20 noshade>
<%
Councilor c=(Councilor)session.getAttribute("COUNCILOR");
String t=(String)session.getAttribute("TIME");

%>
<font size =5 >Logged In :<%=c.getCname() %></font>
<p align = right >Login Time :<%=t %></p>
<table border=1>
<% ArrayList<Followup> list=null;
list=(ArrayList<Followup>)session.getAttribute("FOLLOWUPENQUI
RY");
int enqid=(Integer)session.getAttribute("ENQUIRYID");
if(list==null)
{%>
<center><h1>NO Entry For Enquiry
Id=<%=enqid%></h1></center><br>
<br>
<hr width = 200 noshade>
<br>
<center><a
href="createnewfollowup.jsp?enqid=<%=enqid%>"><h2>Create a
new Followup</h2></a></center>
<%}else{%>

<tr><td>Followup Id</td><td>Enquiry
id</td><td>Date</td><td>Comment</td></tr>
<%for(Followup e:list)
{%>
<tr><td><%=e.getFid()%></td><td><%=e.getEnqid()%></td><td>
<%=e.getFdate()%></td><td><%=e.getComment()%></td></tr>

<%}%>
<a href= "Updatefollowup.jsp?enqid=<%=enqid%>"><h2>Update
Followup</h2></a><br><br>
<%}%>
<a href="seeallenquiry">Back</a>
</table>
</body>
</html>

Createnewfollowup.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("COUNCILOR")==null)
response.sendRedirect("index.jsp");
%>
<%String senqid=request.getParameter("enqid"); %>
<%Councilor c=(Councilor)session.getAttribute("COUNCILOR");
String t=(String)session.getAttribute("TIME");%>
<h2>Logged In :<%=c.getCname() %></h2>

<p align = right >Login Time :<%=t %></p>


<p align = right ><a href="Logoutservletcr">Logout</a></p>
<hr size = 20 noshade>
<form action="createnewfollowupservlet" method="post">
<input type="hidden" name="enqid" value=<%=senqid%> />
<input type="hidden" name="cname"
value=<%=c.getCname() %>/>
<input type="hidden" name="cid" value=<%=c.getCid() %>/><br>
<font size =3>Enter Comment</font><input type="text"
name="comment"required></br>
<input type="submit" value="submit">
</form>
</body>
</html>

Updatefollowup.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("COUNCILOR")==null)
response.sendRedirect("index.jsp");
%>
<% Councilor c=(Councilor)session.getAttribute("COUNCILOR");
String t=(String)session.getAttribute("TIME");
%>
<h2>Logged In :<%=c.getCname() %></h2>
<p align = right >Login Time :<%=t %></p>

<p align = right ><a href="Logoutservletcr">Logout</a></p><br>


<%String senqid=request.getParameter("enqid"); %>
<hr size = 20 noshade>
<center><h2><I>Update Followup
Status...</I></h2></center><br>
<br>
<form action="Updatefollowupservlet" method="post">
<font size = 3>Enter New Comment</font><input type="text"
name="comment" required> <br>
<font size = 3>Enter New Status</font><input type="text"
name="estatus" required> <br>
<input type="hidden" name="enqid" value=<%=senqid%> /><br>
<input type="submit" value="submit">
</form>
</body>
</html>

Seealladmittedcr.java
package org.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
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;
/**
* Servlet implementation class Seealladmittedcr
*/
@WebServlet("/Seealladmittedcr")
public class Seealladmittedcr extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Seealladmittedcr() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse response)

*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
String scid=request.getParameter("cid");
int cid=Integer.parseInt(scid);
HttpSession session = request.getSession();
DataAccess da;
try {
da = new DataAccess();
ArrayList<Enquiry> list=da.getAllAdmiitedcr(cid);
session.setAttribute("SEEALLENQUIRY",list);
//RequestDispatcher rd =
request.getRequestDispatcher("seeallenquiry.jsp");
//rd.forward(request, response);
response.sendRedirect("seealladmittedcr.jsp");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
}}

Seealladmittedcr.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.servlet.*" %>
<%@ page import ="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
if(session.getAttribute("COUNCILOR")==null)
response.sendRedirect("index.jsp");
%>
<% Councilor c=(Councilor)session.getAttribute("COUNCILOR");
String t=(String)session.getAttribute("TIME");
%>
<font size =5>Logged In :<%=c.getCname() %></font>
<p align = right> Login Time :<%=t %></p>
<p align = right> <a href="Logoutservletcr">Logout</a></p><br>

<hr size = 20 noshade><br>


<center><I>list of admitted students</I></center>
<hr width = 200>
<table border=1>

<% ArrayList<Enquiry>
list=(ArrayList<Enquiry>)session.getAttribute("SEEALLENQUIRY");
if(list==null)
{%>
<h1>NO Entry For cid=<%=c.getCid()%></h1>
<%}else{%>
<tr><td>Enquiry Id</td><td>Councilor
Cid</td><td>Date</td><td>Student Name</td><td>Student
Email</td><td>Phone</td>
<td>Address</td><td>Course</td><td>Current
Status</td><td>Comment</td>
<%for(Enquiry e:list)
{%>

<tr><td><%=e.getEnqid()%></td><td><%=e.getCid()%></td>
<td><%=e.getEdate()%></td><td><%=e.getSname()%></td><td><
%=e.getSemail()%></td><td><%=e.getSphone()%></td>
<td><%=e.getSaddress()%></td><td><%=e.getCrsname()%><
/td><td>Admitted</td><td><%=e.getComment()%></td>
<%}%>

</html>

<%} %>
<a href="CsrViewServlet.jsp">Back</a>
</table>
</body>

Logoutsevletcr.java
package org.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;
/**
* Servlet implementation class Logoutservlet
*/
@WebServlet("/Logoutservletcr")
public class Logoutservletcr extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Logoutservletcr() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse response)
*/

protected void doGet(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
HttpSession session = request.getSession(false);
if(session != null)
{session.setAttribute("COUNCILOR", null);
}

// session.invalidate();

//request.getRequestDispatcher("/index.html").forward(req
uest,response);
session.setAttribute("ERROR","Please Login Again...");
response.sendRedirect("index.jsp");
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
// TODO Auto-generated method stub
}
}
Index.jsp
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01


Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert title here</title>
</head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor = lightblue>
<img alt="logo" src="a.jpg" height = 80px width = 80px>
<center><font size = 8 color = black>Lead Management
System</font></center>
<hr>
<hr size = 36 noshade><br>
<br>
<%
String t=(String)session.getAttribute("ERROR");
%>
<h2><%=t %></h2>
<center><font size = 7 ><b>WELCOME</b></font></center>
<font size = 4 color = red ><b><I> Login As:</I></b></font><br>
<ul>
<a href="CenterManager.jsp"> <li><font size = 5 color =
black> Center Manager</font></li></a>
<br>

<a href="csr.jsp"><li><font size = 5 color = black>


Councilor</font></li></a>
</ul>
<br>
<br>
<br>
<br>
<br>
<br>
<hr width = 200 >
<center><I>HERITAGE INSTITUTE OF TECHNOLOGY,KOLKATA<br>
phone +91 9123555555 </I></p></center>
</body>
</html>

Certificate
This is to certify that Mr. Saurabh Kumar of Heritage Institute of
Engineering, registration number: 141260110588, has successfully
completed a project on Advanced Java using JEE under the guidance of
Mr. Titas Roy Chowdhary.

--------------------------------------Mr. Titas Roy Chowdhury


Globsyn Finishing School
(a division of Globsyn skills)

Certificate
This is to certify that Mr. Aditya Kumar Dwivedi of Heritage Institute of
Engineering, registration number: 141260110004 has successfully
completed a project on Advanced Java using JEE under the guidance of
Mr. Titas Roy Chowdhary.

--------------------------------------Mr. Titas Roy Chowdhury


Globsyn Finishing School
(a division of Globsyn skills)

Certificate
This is to certify that Mr. Aman Kumar of Heritage Institute of
Engineering, registration number: 141260110011, has successfully
completed a project on Advanced Java using JEE under the guidance of
Mr. Titas Roy Chowdhary.

--------------------------------------Mr. Titas Roy Chowdhury


Globsyn Finishing School
(a division of Globsyn skills)

Certificate
This is to certify that Ranjeet Kumar Anand of Heritage Institute of
Engineering, registration number: 141260110072, has successfully
completed a project on Advanced Java using JEE under the guidance of
Mr. Titas Roy Chowdhary.

--------------------------------------Mr. Titas Roy Chowdhury


Globsyn Finishing School
(a division of Globsyn skills)

Certificate
This is to certify that Swetank of Heritage Institute of Engineering,
registration number: 141260110118, has successfully completed a
project on Advanced Java using JEE under the guidance of Mr. Titas Roy
Chowdhary.

--------------------------------------Mr. Titas Roy Chowdhury


Globsyn Finishing School
(a division of Globsyn skills)

Вам также может понравиться