Professional Documents
Culture Documents
2
1.1.1 OBJECTIVES:
The Program will develop proficiency in four broad
areas:
1. Leadership, which will enable participants to
master complex material in managing prisons.
3
4. Parole register: This module should track all
prisoners on parole and provide necessary reports on this
data.
5. Education: This module consists of the
information about the education to the prisoner based on his
qualification and interest.
6. Training: This module consists of the
information about the training provided to the prisoner in
various works based on his interest.
7. Interview requests and In-out register: All
interview requests by the relatives of the prisoners need to be
recorded and tracked. An in-out register will track all
prisoners and others who move in and out for various
reasons.
8. Various status reports and demographical
analysis reports are to be generated.
4
Does not integrate prison and visitor management
systems.
Existing systems are stand alone.
Do not have automated release dairy generator.
The current system is rigid. Many options for storing and
retrieving of records are not possible. There is no analysis, no
report generation in existing system
IDENTIFICATION OF NEED:
5
Decreasing the overall size of the prison bureaucracy
6
prison otherwise he will not be allowed. The Jailor has various
services spread out in the system by which he can maintain
the records more conveniently than in the manual system in
an organized way.
7
8
SYSTEM:
Designing and implementing the new links.
Designing and implementing the users.
Arranging new links as subject wise.
SYSTEM ANALYSIS:
System analysis will be performed to
determine if it is feasible to design information based on
policies and plans of the organization and on user
requirements and to eliminate the weaknesses of the present
system.
The new system should be cost effective.
To augment management , improve productivity and
services.
To enhance user / system interface.
To improve information qualify and usability.
To upgrade systems reliability , availability , flexibility
and growth potential.
9
The scope of the software is to develop the
management information system of prisons which will provide
automated prison management system (APMS) of all inmates
housed in jail. This system aims to digitize the MIS modules,
which include prisoners nominal roll where the details of the
prisoner and his/her demographic details will be captured,
Case register, Interview requests and an Automated release
diary generator which displays the list of prisoners to be
released on any given duration of time to efficiently manage
jail affairs.
The visitors and jailor can log in and the jailer can
generate various status reports as well as demographical
analysis reports.
MODULES:
VISITOR:
JAILER:
10
Nominal Roll: The details of the prisoner and his/her
demographic details should be captured. A digital photo
comprising different views of the prisoner and the list of
articles surrendered by prisoner during nominal roll are
to be recorded.
Case register: All the details of the cases against the
prisoner should be captured. This must include the
sentence details, remand/conviction details, etc.
Automated release diary generator: This report should
be display the list of prisoners to be released on a day,
the next day, the next week, the next month, or any
given duration of time.
Parole register: This module should track all
prisoners on parole and provide necessary reports on
this data.
Education: This module consists of the information
about the education to the prisoner based on his
qualification and interest.
Training: This module consists of the information
about the training provided to the prisoner in
various works based on his interest.
Staff: This module consists of the information about
the staff like their name, designation, date of joining
etc.,
11
12
3.1SERVER SIDE DESIGN
Java
Introduction:
13
C++. In addition to surfacing similarities, Java shares some of
the other attributes that helped make C and C++ successful.
14
most common application errors, memory leaks and invalid
memory references.
15
is common that one writes the database application in
proprietary database language, using a database
management system that is available only from one or two
platforms.
NETWORK
JDBC
Application INTERFACE
API
DATABASE NETWOR
16
JDBC driver and register it with JDBC device manager on the
server, that driver can be used only for connections from the
same server the applet came from. That means the web
server and the database must be the same machine, which is
not a typical set up. Of course, the web server can have a
proxy service that routes database traffic to another machine.
When signed Java applets become possible these restrictions
could be loosen.
Components of JDBC
JDBC-ODBC Bridge:
17
ODBC drivers use a bridge technology to connect a Java client
to an ODBC database service. Sun’s JDBC-ODBC bridge is the
most common of this type of driver. These drivers are
implemented using Native Code.
Native-API-Party-Java Driver:
18
machine that will be using the driver. Type 2 drivers can be
used for the following implementations.
JDBC-Net-All-Java-Driver:
19
Middle Ware
Java JDBC Type III Server
Application Driver
Figure 2.12
Native-protocol-All-Java-Driver:
20
Java JDBC Type IV DBMS Client
Application Driver Interface
DATABASE
Servlet
21
and others are not trusted. The full functionality of the class
libraries is available to a Servlet.
22
see that the Servlet can read data that has been provided in
the HTTP request, and may also formulate an HTTP response
for the client.
Architecture of Servlet:
23
communication from back to the client. The Servlet request
interface allows the Servlet access to the information such as
the names of the parameters passed in by the client, the
protocol (scheme) being used by the client, and the names of
the remote host that made the request and the server that
received it. It also provides the Servlet to access the input
stream. Servlet classes of Servlet request allow the Servlet to
retrieve more protocol specific data Input stream, through
which the Servlet gets data from clients that are using
application, protocols such as the HTTP POST and PUT
methods. Subclasses of Servlet request allow the Servlet
more protocol specific data.
24
service will not run it again until after it reloads and
reinitializes the Servlet. When destroy () method runs,
however, other threads might be running service requests. If
in cleaning up, it is necessary to access shared resources that
access should be synchronized.
25
2.5/2.1 6.0.10
2.4/2.0 5.5.23
2.3/1.2 4.1.34
2.2/1.1 3.3.2
Environment:
26
webapp: Folder containing the expanded web
application which will be compiled and validated. By
default, the folder is myapp.
path: Deployed context path of the web application, by
default /myapp.
url: Absolute URL to the manager web application of a
running Tomcat server, which will be used to deploy and
undeploy the web application. By default, the deployer
will attempt to access a Tomcat instance running on
localhost, at http://localhost:8080/manager.
username: Username to be used to connect to the
Tomcat manager.
password: Password to be used to connect to the
Tomcat manager
27
ORACLE9i
28
In short modern (Relational) RDBMS act as a
transparent interface between the physical storage and the
logical presentation of data. It provides a set of flexible and
sophisticated tools for handling information. The tools can be
used to
• Define database.
• Query a database.
• Add, delete and modify the database.
• Modify the structure of the database.
• Secure the data public access.
• Communications within networks/time sharing
environments.
• Export and import the data.
29
A query is a statement requesting the retrieval of
information. The portion of DML that involves information
retrieval is called “Query Language”. Hence sometimes DML is
also called as query language.
Overview:
database performance
ease of management
scalability
security
availability
30
reduction in latch contention (SGA locks) and I/O
improvements
better Java performance (better compilation, improved
garbage collection)
distributed database performance enhancements
31
For the last few releases Oracle have been putting a
lot of effort into increasing database availability and this
continues with Oracle 9i with new features including:-
WINDOWS INTEGRATION
32
3.2.CLIENT SIDE DESIGN
Hyper Media:
33
not be fonts installed. So your formatted text will appear
differently on differently on different machines/platforms.
Advantages:
Java Script:
34
of some corresponding events. A handler can handle each
event occurrences.
Uses of JavaScript:
vaScript is case-sensitive.
JavaScript is flexible about statements.
A single statement can cover multiple lines; you can
put multiple short statements on a single line –just make sure
to add a semicolon (;) at the end of each statement .Braces
(the ‘{‘ and ‘}’ characters) group statements into blocks. A
35
block may be the body of a functional or a section of code
that gets executed in a loop or as part of the conditional test.
JavaScript is designed to resemble Java, which, in
turn, looks a lot like C and C++. The difference is that Java
was built as a built as a General-purpose object language,
JavaScript, on the other hand, is intended to provide a
quicker and language for enhancing web pages servers.
However, JavaScript is limited itself to perform only the client
side validations but not the server side validations.
36
Client- side
JavaScript
CORE
CLIENT-SIDE SERVER-SIDE
JAVASCRIPT
ADDITION ADDITIONS
CORE
(SUCH AS (SUCH AS
LANGUAGE
WINDOW SERVER AND
FEATURES
AND DATABASE)
SUCH
HISTORY)
AS VARIABLE,
FUNCTIONS
AND
CLIENT-SIDE LIVE CONNECT SERVER-SIDE
JavaScript Architecture
Server-side and client-side share the same core
language (ECMA-262), the scripting language standardized by
the European standards body which contains core objects,
other features like expressions, statements and operators.
The main modules of JavaScript are Core and DOM.
37
FEATURES OF JAVASCRIPT (JS)
Browser interprets JavaScript.
JavaScript is object based and uses built-in, extensible
objects and have no classes or inheritance
JavaScript is loosely typed language
In JavaScript object reference are checked at runtime
JavaScript is designed to supplement the capabilities of
HTML with script that are capable of responding to web
pages events. JSP has access to some extent of aspects
of the web browser window.
JavaScript control browser and content but cannot draw
graphics or perform networking.
38
JSP
Introduction to JSP (Java Server Pages):
Java Server Pages (JSP) is a Java technology that
allows software developers to dynamically generate HTML,
XML or other types of documents in response to a Web client
request. The technology allows Java code and certain pre-
defined actions to be embedded into static content.
JSP Syntax:
A Java Server Page may be broken down into the following
pieces:
Static data
JSP directives
39
Include – The include directive informs the JSP compiler
to include a complete file into the current file. It is as if
the contents of the included file were pasted directly
into the original file. This functionality is similar to the
one provided by the C preprocessor. Included files
generally have the extension "jspf" (for JSP
ragment):<%@ include file="somefile.jspf" %>
40
4.2.4 JSP Implicit Objects
Scripting elements:
There are three basic kinds of scripting elements that allow
java code to be inserted directly into the servlet.
41
JSP actions
JSP actions are XML tags that invoke built-in web server
functionality. The following actions are provided:
42
JSP Standard Tag libraries (JSTL)
43
3.3 DATA FLOW DIAGRAMS :
44
VISITOR
45
JAILER
HIGH-LEVEL:
DESCRIPTION:
46
USECASE DIAGRAM: JAILER LEVEL
HIGH-LEVEL:
DESCRIPTION:
47
ACTIVITY DIAGRAM:VISITOR
DESCRIPTION:
This activity diagram describes the flow in
which the activities occur. The visitor first registers and then
logs in. Once he is proved to be authenticated he can either
put a request to visit a particular prisoner or he can view his
visit details through the visit register.
ACTIVITY DIAGRAM:JAILER
48
DESCRIPTION:
DESCRIPTION:
49
CLASS NAME METHODS DESCRIPTION
1.This method
enables us to
view the details
of all the
prisoners.
2. This method
1. viewAll ()
enables us to
Jailer 2. update ()
update the
3. newRegistration ()
details of all the
prisoners.
3. This method
enables a new
jailer to get
registered.
This method
enables us to
Nominal Role getNomDetails() retrieve the
personal details
of the prisoner.
This method
enables us to
Case Register getCaseDetails() retrieve the
case details of
the prisoner.
This method
enables us to
Parole Register getParoleDetails() retrieve the
parole details of
the prisoner.
This method
enables us to
retrieve the
Education getEduDetails() education
details he is
undergoing in
the prison.
This method
enables us to
Training getTrainyDetails()
retrieve the
training details.
In-Out Register 1.getPrisonerWise() This method
2.getVisitorWise() enables us to
retrieve the in-
50
out details of
both prisoners
and visitors.
This method
enables us to
retrieve the list
Automated Release
getReleaseDetails() of prisoners
Dairy
who are going
to be released
on a given date.
`
DESCRIPTION:
CLASS NAME METHODS DESCRIPTION
This method
enables the
egistration getRegistered()
visitors to get
registered.
This method
Login validate() authenticates the
visitor.
1.This method
allows the visitor
to view his visit
1.viewDetails() details.
Visit Register 2.submitRequest() 2.This method
allows the visitor
to place a
request to visit
the prisoner.
51
USECASE DIAGRAM: VISITOR LEVEL
LOW-LEVEL:
DESCRIPTION:
52
USECASE DIAGRAM: JAILER LEVEL
LOW-LEVEL DESCRIPTION:
53
Parole register: This module should track all prisoners
on parole and provide necessary reports on this data.
SEQUENCE DIAGRAM:VISITOR
54
55
56
NOMINAL_ROLE:
DESCRIPTION:
PAROLE_REG:
57
PRISONERID VARCHAR2(10) FOREIGN KEY
PRISONERNAME VARCHAR2(10) NOT NULL
REF_NAME VARCHAR2(10) NOT NULL
REF_ADD VARCHAR2(50) NOT NULL
EXIT_DATE DATE NOT NULL
ENTRY_DATE DATE NOT NULL
LAST_VISITDATE DATE NOT NULL
CASEID VARCHAR2(10) FOREIGN KEY
DESCRIPTION:
CASE_REG:
DESCRIPTION:
DESCRIPTION:
58
COURSE:
DESCRIPTION:
TRAINING:
DESCRIPTION:
WORK:
DESCRIPTION:
59
This table consists of the different kinds of works the
prisoners can do in the prison like weaving section, carpentry,
paper unit, chemical section etc.
VISITOR:
DESCRIPTION:
VISITREGISTER:
DESCRIPTION:
STAFF1:
60
FIELD NAME DATA TYPE CONSTRAINT
STAFF_ID VARCHAR2(10) PRIMARY KEY
STAFFNAME VARCHAR2(10) NOT NULL
DESIGNATION VARCHAR2(20) NOT NULL
IMAGE VARCHAR2(100) NOT NULL
DOJ DATE NOT NULL
ADDRESS VARCHAR2(50) NOT NULL
DESCRIPTION:
LOGIN:
DESCRIPTION:
This table contains the login details of the staff like their ID
and password.
61
Implementation is the process of having systems
personnel check out and put new equipment into use, train
62
users, install the new application depending on the size of the
organization that will be involved in using the application and
the risk associated with its use, systems developers may
choose to test the operation in only one area of the firm, say
in one department or with only one or two persons.
Sometimes they will run the old and new systems together to
compare the results. In still other situation, developers will
stop using the old system one-day and begin using the new
one the next. As we will see, each implementation strategy
has its merits, depending on the business situation in which it
is considered. Regardless of the implementation strategy
used, developers strive to ensure that the system’s initial use
in trouble-free.
63
and standards, and other project management criteria.
Includes assessment of development methods and tools.
64
System testing is the stage of implementation that is
aimed at ensuring that the system works accurately and
efficiently for live operation commences. Testing is vital to the
success of the system. System testing makes a logical
65
assumption that if all the parts of the system are correct,
then goal will be successfully achieved. A series of testing is
done for the proposed system before the system is ready for
the user acceptance testing.
The steps involved in Testing are:
Unit Testing:
Integration Testing:
Validation Testing :
66
tested by using validation testing and found to be working
satisfactorily.
Output Testing:
Test Data:
Testing:
The testing done here was System Testing–
checking whether the user requirements were satisfied. The
code for the new system has been written completely using
67
JSP as the coding language, HTML as the interface for front-
end designing and Java Script for validating the client-side
applications. The new system has been tested well with the
help of the users and all the applications have been verified
from every nook and corner of the user.
Although some applications were found to be erroneous
these applications have been corrected before being
implemented. The flow of the forms has been found to be
very much in accordance with the actual flow of data.
68
ABOUT US:
69
HISTORY:
70
INFRASTRUCTURE:
71
72
JAILER OUTPUT SCREENS
J.AILER LOGIN FORM:
73
NEW PRISONER WINDOW:
74
IMAGES:
75
76
77
78
79
80
81
82
The “PRISON MANAGEMENT SYSTEM “ has been
successfully completed . The goal of the system is achieved
and problems are solved . The package is developed in a
manner that it is user friendly and required help is provided at
different levels.
FUTURE ENHANCEMENTS
Inmate tracking:
83
The system enables real-time restricted zones
administration and supports correctional facilities' operations
by tightening supervision of inmates and enhancing the
security of staff members.
Biometric in prisons:
84
This swelling industry is finding a natural market in
India's booming jails and prisons. The number of people
behind bars has almost quadrupled since 1980, and continues
to rise. All of those inmates, as well as the guards who watch
them and the loved ones who visit them, have to be
monitored to ensure that only the right ones go in -- and out.
85
BIBLIOGRAPHY
SOFTWARE ENGINEERING
By Roger.S. Pressman
CORE JSP
By Damon Hougland
COMPLETE HTML
Steven Holzner
www.w3shools.com
www.academictutorials.com
www.java.sun.com
www.mysql.com
www.javasoft.com
www.coreservlets.com
86
87
VISIT REQUEST :
import javax.servlet.*;
import java.io.*;
import javax.servlet.http.*;
import java.util.*;
import java.util.Calendar;
import java.text.*;
import java.sql.*;
import java.lang.*;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
conn=DriverManager.getConnection("jdbc:odbc:satyam1","scott",
"tiger");
stmt=conn.createStatement();
RequestDispatcher rd;
java.util.Date dt=new java.util.Date()
String s2=req.getParameter("t2");
java.util.Date dd=new java.util.Date();
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss")
Format form = new SimpleDateFormat("dd-MMM-yyyy")
DateFormat ft = new SimpleDateFormat("dd-MMM-yyyy");
pw.println("<br>"+s2+"<br>"+form.format(dt)+"<br>"+ft.parse(s2)+"<
br>"+dt+"<br>"+(ft.parse(s2)).after(ft.parse(form.format(dt)))+"<br>"
+dt.before(ft.parse(s2))+"<br>"+dt.after(ft.parse(s2)));
HttpSession ses=req.getSession
int p=0;
ResultSet rs=stmt.executeQuery("select prisonerId from
88
visitor where visitor_Id='"+ses.getAttribute("vid")+"'");
pw.println(ses.getAttribute("vid"))
rs.next();
String pid=rs.getString(1);
ResultSet rs1=stmt.executeQuery("select status from
nominal_role where prisonerId='"+pid+"'");
pw.println("select status from nominal_role where
prisonerId='"+pid+"'");
rs1.next();
if((rs1.getString(1)).equals("Nr"))
{
ResultSet rs2=stmt.executeQuery("select exit_date from
nominal_role where prisonerId='"+pid+"'");
rs2.next();
String exit=rs2.getString(1);
String ex;
if( !(exit==null))
{
dd = (java.util.Date)formatter.parse(exit);
ex=form.format(dd);
}
pw.println("<br>"+ft.parse(s2)+"<br>"+ft.parse(form.format(dt))+"<br
>"+(ft.parse(s2)).after(ft.parse(form.format(dd))));
if((ft.parse(s2)).after(ft.parse(form.format(dt))))
{
if((ft.parse(s2)).before(ft.parse(form.format(dd))))
//comparision of dates
{
ResultSet rs3=stmt.executeQuery("select visitor_Id from
visit_reg where visitdate='"+s2+"' and
prisonerId='"+ses.getAttribute("pid")+"'");
pw.println("HELLO");
while(rs3.next())
{
pw.println("HELLO");
p=1;
String status="reject";
rd=req.getRequestDispatcher("reject.htm");
rd.forward(req,res);
String status="accept";
89
rd=req.getRequestDispatcher("accept.htm");
rd.forward(req,res);
pw.close();
}
}
Else
{
rd=req.getRequestDispatcher("release.html");
rd.forward(req,res);
}
}
else
{
rd=req.getRequestDispatcher("previous.htm");
rd.forward(req,res);
}
else
{
rd=req.getRequestDispatcher("noprisoner.htm");
rd.forward(req,res);
}
}
catch(ClassNotFoundException e)
{
pw.println("exception"+e);
}
catch(SQLException e)
{
pw.println("exception"+e);
}
catch(Exception e)
{
pw.println("can't load driver"+e.getMessage());
}
}
}
VISITOR REGISTRATION:
<html>
<head>
<title>prison</title>
<script language="JavaScript" type="text/JavaScript">
function validation()
{
var l=f1.t3.value.length;
90
if(f1.t1.value==""||f1.t2.value==""||f1.t3.value==""||
f1.t4.value==""||
f1.t5.value==""||f1.t6.value==""||f1.t7.value==""||f1.t8.value==""||
f1.t9.value==""||f1.t10.value==""||f1.t11.value=="")
{
alert("FILL ALL THE REGISTRATION DETAILS");
return false;
}
else if(f1.t3.value!=f1.t4.value)
{
alert("RETYPE PASSWORD CORRECTLY");
f1.t4.value="";
f1.t3.value="";
return false;
}
else if(l<6 )
{
alert("PASSWORD SHOULD CONTAIN MINIMUM OF 6 CHARACTERS");
f1.t3.value="";
f1.t4.value="";
return false;
}
}
</script>
</head>
<body background="background.jpg"
onLoad="MM_preloadImages('history2.gif','infra2.gif','reformation2.gif','fa
ctory2.gif','contact2.gif','aboutus2.gif')">
<table width="158" border="0">
<tr>
<td width="180" height="175"><img src="logo.gif" width="150"
height="180"></td>
</tr>
</table>
<table style="position:absolute; left:; left: 855px; top: 26px; height:
21px; width: 60px;"43px";top:"21px";width="200" border="0">
<tr>
<td><strong><font color="#0000FF" size="2">[</font><a
href="HOME.htm"><strong><font size="2"> HOME
</font></strong></a><strong><font color="#0000CC" size="2">]
</font></strong></strong></td>
</tr>
</table>
<table style="position:absolute;left:189px; top:48px; width: 804px;
height:105px;" " width="200" border="0">
<tr>
<td ><p class="style3">PRISON MANAGEMENT SYSTEM </p></td>
</tr>
</table>
<table style="position:absolute; left:; left: 614px; top: 598px; height:
37px; width: 58px;"43px";top:"21px";width="200" border="0">
<form action="/sindhu/REGISTRATION.htm" method="post">
<p align="center">
<input type=submit value="RESET" name="RESET">
</p>
</p>
91
</form>
</table>
</tr>
<tr>
<td><b> VISITOR-NAME::</b>
<td> <input name="t1" type=text>
</tr>
<tr>
<td><b>PASSWORD::</b>
<td> <input name="t3" type=password >
</tr>
<tr>
<td><b>RETYPE PASSWORD::</b>
<td> <input name="t4" type=password>
</tr>
<tr>
<td><b>GENDER::</b>
<td> <select name="t5" >
</tr>
<tr>
<td><b>SECURITY QUESTION::</b>
<td> <select name="t6">
<option value=" ">[select a question]</option>
<option value="what is middle name of your
father? ">what is middle name of your father?</option>
<option value="what is your favorite
pasttime?">what is your favorite pasttime?</option>
</select>
</tr>
<tr>
<td><b>ANSWER::</b>
<td>
<input name="t11" type=text>
</tr>
<tr>
<td><b>PRISONER NAME::</b>
<td> <input name="t7" type=text>
</tr>
<tr>
<td><b>PRISONER-ID::</b>
92
<td> <input name="t8" type=text>
</tr>
<tr>
<td><b>RELATION WITH PRISONER::</b>
<td> <input name="t9" type=text>
<tr>
<td><b>ADDRESS::</b>
<td>
<textarea name="t10" cols=15 rows=2 ></textarea>
</tr>
<tr>
<td><b>SECURITY CODE::</b>
<td> <input name="t12" type=text>
</tr>
</table>
<table style="position:absolute; left:394px; top:198px; height: 56px;
width: 271px;"width="200" border="0">
<tr>
<td><span class="style6">REGISTRATION FORM </span></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"> </p>
<p align="center">
<br>
<input type=submit value="SUBMIT" name="submit">
</form>
<p align="center"> </p>
<!-- -->
93
</body>
</html>
94