1
1.1. GENERAL INTRODUCTION
Software Development services Engineering Services Systems Integration Customer Relationship Management Product Development Electronic Commerce Consulting IT Outsourcing
We apply apply technol technology ogy with with innov innovati ation on and respon responsib sibili ility ty to achieve two broad objectives:
Effectively address the need of our Prisons today. today. Gener Generate ate new opport opportuni unitie ties s that that will will help help them them stay stay ahead in the future.
This approach rests on:
A strategy where we architect, integrate and manage Prison services – we call it AIM for PERFECTION. A robu robust st offs offsho hore re deve develo lopm pmen entt me meth thod odol olog ogy y and and reduced demand on Prison services. A focus on the use of reusable frameworks to provide cost and time benefits.
They combine the best people, processes and technology to achieve excellent results-consistency. We We offer Prison the advantages of:
BETTER USER INTERFACE. ENSURING SCALABILITY. RIGHT TOOLS TO RUN ADMINISTRATION SMOOTHLY. RECORDING AND TRACKING OF ALL PRISON MOVEMENTS. INTEGRATION INTEGRATION OF PRISON AND VISITOR MANAGEMENT SYSTEMS. COMPREHENSIVE CULLING OF INFORMATION ABOUT PRISONERS. COURT CASES AND CRIME. PROVISION OF AUTOMATED AUTOMATED RELEASE DAIRY GENERATOR. HANDLING VISIT REQUEST ONLINE GENERATES STATUS REPORTS
2
1.1.1 OBJECTIVES: The The Prog Progra ram m will will deve develo lop p prof profic icie ienc ncy y in four four broa broad d areas: 1. Leadership, which will enable participants to master complex material in managing prisons. 2. Knowledge of the economic, medical, epidemiological, social, community and political aspects that that relate specifically to prison and to the prison service, in order to unde unders rsta tand nd thei theirr infl influe uenc nce e on the the pris prison oner ers s and and thei theirr implications on the whole of society. society.
3. Advanced skills of administration and policy analysis and their implementation in prison management.
1.2. PROJECT DESCRIPTION This This proje project ct is aime aimed d at deve develo lopi ping ng a pris prison on mana ma nage gemen mentt syst system em that that is a co coll llec ecti tion on of regi regist sters ers and and reports for the effective management of prisons. This system should contain the modules like nominal roll, case register, parole register, register, Education, Training, Training, Interview requests, In-out register and an automated release re lease diary generator. generator. 1. Nominal Roll: The details of the prisoner and his/her his/her demogr demograph aphic ic detail details s should should be captur captured. ed. A digita digitall photo comprising different views of the prisoner and the list of articles surrendered by prisoner during nominal roll are to be recorded. 2. Case Case regi regist ster er:: All All the the deta detail ils s of the the ca case ses s against the prisoner should be captured. This must include the sentence details, remand/conviction details, etc. 3. 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.
3
4. Pa Parol role e regist register: er: This This module module should should track track all prison prisoners ers on parole parole and provi provide de necessa necessary ry report reports s on this this data. 5. Education: on: This module consists sts of the information about the education to the prisoner based on his qualification and interest. 6. Training: This module consists of the inform informati ation on about about the train training ing provid provided ed to the prison prisoner er in various works based on his interest. 7. Inte Interv rvie iew w requ request ests s and and In-ou In-outt regi regist ster er:: All All interview requests by the relatives of the prisoners need to be reco record rded ed and tra tracked cked.. An in-o in-ou ut regi regist ster er will will tra track all all pris prison oner ers s and othe others rs who move ove in and out out for for vario rious reasons. 8. Vario arious us stat status us repo report rts s and and demo demogr grap aphi hica call analysis reports are to be generated. 9. Staf Staff: f: This This mo modu dule le cons consis ists ts of the the info inform rmat atio ion n about the staff like their name, designation, date of joining etc.,
1.3 EXISTING SYSTEM AND DRAWBACKS Automation of Prison helps the jailor in order to maintain the prison effectively and efficiently. It also keeps track of information regarding prisoners and the visitors. The major drawbacks of existing system are:
The The Manu Manual al recor record d entr entry y is very very slow slow and and ofte often n ted tediou ious. Hum Human erro errorrs
are are
alw always
pos ossi sib ble in
ente enteri ring ng the the data data.. It take takes s lot lot of time time to veri verify fy where the data is entered incorrectly incorrec tly..
Submiss ssiion
of
illegal
bills
to
the
board.
Fake
information is sent to the board regarding reception of stock items.
Difficulty in retrieval and access of data
Lack of security s ecurity,, unauthorized access to data.
Unnecessary investment towards inventory items.
4
Does not integrate prison and visitor management systems.
Existing systems are stand alone.
Do not have automated release dairy generator.
The The curr curren entt syst system em is rigi rigid. d. Many Many opti option ons s for for stor storin ing g and and retrieving of records are not possible. There is no analysis, no report generation in existing system
IDENTIFICATION OF NEED: Prison management system is used for storing all the data regarding regarding the details details of the prisoners prisoners , visitors visitors and the staff . The detail details s regarding regarding the prisone prisoners rs include include their pers person onal al , ca case se deta detail ils s .The .The deta detail ils s incl includ ude e not not only only the the prisoners personal details but also the type of crime he has committed ,the duration of imprisonment ,his parole details ,their ,their status report(rele report(released ased or not released) released) , his education education and training details . The details regarding the visitors include their their relati relation on with with prison prisoner er , detail details s of their their visit visit to the prison and providing online access to the visitor in order to put a request to meet a particular prisoner . In the changing world of today, the need for highly effective management of prisons and other related institutions has never been greater. greater. The effective management of prisons, has been linked, both in theory and practice, to sustained economic development and is a major vehicle through which to devel evelop op mo mode derrn pri priso son n ma man nagem agemen entt syst system ems s and and principles. Governments and prison services around the world are undergoing processes of renewal and reform that pose new challe challenge nges s and opport opportuni unitie ties s in prison prison ma manag nagemen ement. t. Thes These e sa same me chal challe leng nges es and and oppo opport rtun unit itie ies s dema demand nd new new knowledge, skills and leadership abilities. The shift in the focus of prison management, which leads to the move from an input to an output orientation, a stress on quality prisoner-based service and the increasing role of performance-based management systems, gives rise to a new concept of responsible professionalism within the prison. Prison reform does not focus solely on transitional countries, but forms part of a worldwide movement. Examples of such reforms indicate major changes in:
5
Decreasing the overall size of the prison bureaucracy
Strengthening the policy-making role of senior officials at the national administration level
A shift in the role of bureaucrats from policy initiators to policy advisers and implementers
A decentralization of central administration functions to the level of the local prison manager
A stre streng ngth then enin ing g of the the poli policy cy and and tech techni nica call supp suppor ortt systems within the prison administration
NEED FOR AUTOMATION The need for automation was felt because of the inability to monitor and keep track of the large amount of data received.
Physical handling of the voluminous data is problematic to the store people.
There is no security for the information.
It ca cau uses ses inco inconv nven enie ienc nce e to the the stor store e to view view the the previous year details.
Generation of statistical reports from the bulk of data becomes tedious.
1.4. PROPOSED SYSTEM The proposed system computerizes the maintenance of the records about the prisoners in the prison with out much strain to the users. In the system the visitors can also book the slots online to visit the prison. If the slot for the particular day is empty then he will be allowed to visit the
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.
Integrates both prison and visitor management systems.
Has automated release dairy generator.
Is a web application which can be accessed online.
Bene Benefi fits ts of Auto Automa mate ted d Pris Prison on Mana Manage geme ment nt System :
This This project project is com comple pletely tely secure secured d and automa automated ted in orde orderr to ma make ke it easy easy for for the the jail jailor or and and visi visito tors rs to access the information on a single mouse click.
All All info inform rmat atio ion n is stor stored ed in the the data databa base se prov provid idin ing g better user interface.
Details can be entered and modified by jailor. jailor.
Easy approval or rejection of the visitor.
Easy accessing of the management system to necessary timely changes.
This PRISON MANAGEMENT SYSTEM project is all set to bring ease and accuracy in the work there by saving the man power and time to a great extent.
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.
2.1.
PROBLEM STATEMENT
The objective of the project is to design and develop prison management system for prisons in order to handle the prisoners and visitors records. The authorized person is jailer who updates the records of prisoners and visitors .A visitor can retrieve the application online and has rights to access only his account .A common man can also use this site for viewing the prison details .
2.2.
PROBLEM
DESCRIPTION
Prison Prison Manage Managemen mentt System System provid provides es the soluti solution on to update and preserve the complete record of inmates, enhance security, and further improve the management and planning of jails.
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 prison prisoner er and his/h his/her er demogr demograph aphic ic detail details s will will be captur captured, ed, Case register, Interview requests and an Automated release diar diary y gene genera rato torr whic which h disp displa lays ys the the list list of pris prison oner ers s to be released on any given duration of time to efficiently manage jail affairs. PMS –Prison Management System is a secure system to mode mo dern rniz ize e Inma Inmate te Record ecord ma main inten tenan ance ce whic which h faci facili lita tates tes electronic processing and the management of such activity to provid provide e higher higher level level of com compli plianc ance e and faster faster service service with with lower cost and higher efficiency. PMS aims at fair and transparent implementation and manag anagem emen entt of inmat nmate e attri ttrib bute ute data ata .Th .The PM PMS S also also maintains Parole register which tracks all prisoners on parole and provide necessary reports on this data. An In-Out register will track all prisoners and others who move in and out for vario various us reason reasons s which which includ include e provis provision ions s for record recording ing the prisoners sent to courts for hearing. The The visi visito tors rs and and jail jailor or ca can n log log in and and the the jail jailer er ca can n gener generate ate vario various us statu status s report reports s as well well as demogr demograph aphica icall analysis reports.
MODULES: VISITOR: Every prisoner is associated with four visitors.This module enables the visitor to view his visit details and has the previlige to put a request to meet a particular prisoner.He prisoner.He can also view the status (released/not-released) (released/not-released) of his prisoner .
JAILER: The jailer is the administrator who uploads the details of the prisoner,view prisoner,view the details of the prisoner and his associated visitors.He has access to the following modules.
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 pris prison oner er shou should ld be ca capt ptur ured ed.. This This must must incl includ ude e the 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. register: This module should track all Parole prisoners on parole and provide necessary reports on this data. Education: This module consists of the information abou aboutt the the educ educat atio ion n to the the pris prison oner er based based on his his qualification and interest. raining: ng: This This module module consist consists s of the inform informati ation on Traini abou aboutt the the trai traini ning ng provi provide ded d to the priso prisone nerr in various works based on his interest. Staff: This module consists of the information about the staff like their name, designation, date date of joining etc.,
2.3 HARDWARE & SOFTWARE SPECIFICATIONS 2.2.1 HARDWARE REQUIREME REQUIREMENTS: NTS:
2.2.2
Processor
:
Intel P-IV system
Processor Speed
:
250MHz to 833MHz
RAM
:
256MB RAM
Hard Disk
:
40GB
SOFTWARE REQUIREMENTS: Operating System
:
Windows XP
Database
:
Oracle 9i
Server side technology
:
Servlets
Server side scripting
:
JSP
Client side scripting
:
HTML,Javascript
:
Tomcat
Web-Server
11
12
3.1SERVER SIDE DESIGN Java Introduction: Jav Java was co conc ncei eiv ved by Jam James Gosl Goslin ing, g, Patri atrick ck Naughton, Chris Warth, EdFrank and Mike Sheridan at Sun Microsystems in 1991. It took 18 months to develop the first working version. This language was initially called “oak” but was renamed “Java” in 1995. The original impetus for Java was not the internet instead, the primary motivation was the need for a platform independent (that is architecture-neutral) lan languag guage e that that co coul uld d be used sed to crea create te so soft ftw ware are to be embedded in various consumer electronic devices. The trouble with C and C++ is that they are designed to be complied for a specific target. Although it is possible to compile a C++ program for just about any type of CPU, to do so requires a full C++ compiler targeted for that CPU. The problem is that compilers are expensive and time cons co nsum umin ing g to crea create te.. An easi easier er and and mo more re co cost st effi effici cien entt solution was needed. In an attempt to find such a solution, Gosl Goslin ing g and and othe others rs bega began n work work on a port portab able le,, plat platfo form rm independent language that could be used to produce code that woul ould run on a variety of CPU’s under differ fering enviro environme nments nts.. This This effort effort ultima ultimately tely led to the creati creation on of Java. The second factor that would play a critical role in the the futu future re of Jav Java was the the World orld Wide Wide Web. eb. With ith the the emergence of the World Wide Web, Java was propelled to the forefront of computer language design, because the web, too, demanded portable programs. With the advent of the internet and the web, the old problem of portability returned with a vengea vengeance nce.. The Intern Internet et consist consists s of a divers diverse, e, distri distribut buted ed universe universe populated populated with many types of computers, computers, operating operating systems, and CPU’s. Even though many types of platforms are attached attached to the Internet, Internet, users would like them all to run the same program. What was once an irritating but low priority problem had become a high profile necessity. While the desire for an architecture neutral programming language provided the initial spark, the Internet ultimately led to Java’s large scale success. Java derives much of its character from C and 13
C++. In addition to surfacing similarities, Java shares some of the other attributes that helped make C and C++ successful.
Features of the Java: The Common Common Langua Language ge Runtim Runtime e provid provides es a CodeCodeExecution Environment that Manages code targeting the .NET Framework. Code Management can take the form of Memory Manage Managemen ment, t, Thread Thread Manage Managemen ment, t, Securit Security y Manage Managemen ment, t, Code ode Verif erific icat atio ion n and and Com Compila pilati tion on,, and and oth other System stem Services. Managed Components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, Enterprise Network, or Local Computer) Computer).. This means that a Managed Managed Component Component might might or might not be able to perform File-access Operations, Registryaccess Operations, or other Sensitive Functions, even if it is being used in the same s ame active application. The runtime enforces Security Security in a way that enables users to trust that although an executable attached to E-Mail can play an animation on screen or sing a song, it cannot acce ac cess ss thei theirr pers person onal al data data,, File File Syst System em,, or Netw Networ ork. k. The The Secu Securi rity ty Feat Featur ures es of the the runt runtim ime e thus thus enab enable le legi legiti tima mate te Internet-Deployed Software to be exceptionally feature-rich. The The runt runtim ime e also lso enfo enforrces ces code ode robus obustn tnes ess s by implementing a Str Strict Type and Code Verification infra infrastr struct ucture ure called called the Common Common Type System System (CTS). (CTS). The CTS ensure ensures s that that all Manage Managed d Code Code is self-de self-descr scribi ibing. ng. The various Microsoft and third-party language compilers generate Managed Code that conforms to the CTS. This means that Managed Code can consume other Managed Classes, Types, and Object Objects, s, while while strict strictly ly enforc enforcing ing type type fidelit fidelity y and Type Safety. In addition, the Managed Environment of the runtime ensures that the most common types of software issues are solved solved or eradi eradicat cated ed com comple pletel tely y. For For exampl example, e, the runtim runtime e automatically handles object layout and manages references to objects objects,, releas releasing ing them when when they they are no longer longer being used. This automatic Memory Management eliminates the two
14
most common application errors, memory leaks and invalid memory references. The runtime, coupled with the CTS, also accelerates developer developer productivi productivity ty.. For example, example, programm programmers ers can use their favorite development language, being absolutely assured that they can still take full advantage of the runtime, the class library, and components written in other languages by other developers. Any compiler vendor who chooses to target the runtime can do so. Language compilers that target the .NET Fram Framew ewor ork k make ake the the fea feature tures s of the the .NE .NET Fram Framew ewor ork k avai availa labl ble e to exist existin ing g co code de writ writte ten n in that that lang langua uage ge,, thus thus greatly easing the migration process for existing applications. Although Although the runtime runtime is designed designed for the software of the future, it also supports software of today and yesterday. Inte Intero rope pera rabi bili lity ty betw betwee een n Mana Manage ged d and and Un Unma mana nage ged d Code Code enab enable les s deve develo lope pers rs to co cont ntin inue ue to use use nece necess ssar ary y COM COM components and DLLs. The runtime is designed to enhance Performance. A feat featur ure e ca call lled ed Just Just-I -Inn-Ti Time me (JIT (JIT)) co comp mpil ilin ing g enab enable les s all all Managed Code to run in the Native Machine Language of the system on which it is executing. Finally, the runtime can be hosted by Highperf perfor orma manc nce, e, Serv Server er-si -side de appl applic icat atio ions, ns, such such as Inte Intern rnet et Inform Informati ation on Servic Services es (IIS) (IIS) and Micros Microsoft oft SQL Server Server. This This enab enable les s you you to use use Mana Manage ged d Code Code to writ write e your your busi busine ness ss logic, logic, while while still still enjoyi enjoying ng the superi superior or perfor performan mance ce of the industry's best enterprise servers.
Java Database Connectivity (JDBC): JDBC JDBC is a set set spec specif ific icat atio ion n that that defi define nes s how how a program written in Java can communicate and interact with a data databa base. se. It prov provid ides es a vehi vehicl cle e for for the the exch exchan ange ge of data data between Java application and databases. Programs developed with Java and the JDBC are platform independent and vendor independent. The same Java database program can run on PC, a workstation, or Java powered terminal. You can move your data data from from one one data datab base to anoth nother er, for for exam exampl ple e from from Microsoft SQL Server to Oracle and the same program can still read read your your data data.. This This is in shar sharp p co cont ntra rast st to the the data databa base se programming typically done on personal computers today. It
15
is co comm mmon on that that one one writ writes es the the data databa base se appl applic icat atio ion n in proprietary database language, using a database management system that is available only from one or two platforms. At the heart of the JDBC is the JDBC driver. JDBC driver is responsible for ensuring that a request made by the appl applic icat atio ion n is pres presen ented ted to the the data databa base se in away away that that is meaningful to the databases. JDBC was designed to support the most common form of SQL known as ANSI SQL 92 entry level standard. The JDBC consists of two layers. The top layer is the JDBC API. This API communicates with JDBC manager driver API sendin sending, g, it the vario various us SQL statem statement ents. s. The manage managerr should should communicat communicate e with the various various third party party drivers drivers that actually connect to the database and return the information from from the the quer query y or perf perfor orme med d the the ac acti tion on speci specifi fied ed by the the query.
Application
JDBC API
NETWORK INTERFACE
DATABASE
Figure illustrates the role of JDBC
Typical uses of the JDBC Just as one can use Java for both applic applicati ations ons and and applets applets,, one can use the JDBC enhanc enhanced ed version of Java in both applications and applets, when that version is used sed in an applet, all the norm ormal sec security restrictions applied. JDBC continues to assume all applets are trusted. In particular, applets that use JDBC would only be able to open a database connection from the server from from whic which h they they are are down downlo load aded ed.. They They ca can n ma make ke neit neithe herr explic explicit it nor implic implicit it use of infor informat mation ion.. Althou Although gh the JDBC extensions of the Java security model allow on to download a
16
JDBC driver and register it with JDBC device manager on the server, that driver can be used only for connections from the same sa me serv server er the the appl applet et ca came me from from.. That That me mean ans s the the web 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. Applications on the other hand have complet com plete e freedo freedom. m. They They can give give the applic applicati ation on the total total access to files and remote servers. We envision that JDBC applications will be very common.
Components of JDBC There are three components to the JDBC The JDBC driver manager The JDBC driver test suite
The JDBC-ODBC bridge The JDBC driver manager is the backbone of the JDBC JDBC arch archit itec ectu ture re.. It ac actu tual ally ly quit quite e sm smal alll and and simp simple le its its primary function is to connect Java applications to the connect JDBC driver and then get out of the way. The JDBC driver driver test suite provides provides some confid confidenc ence e that that JDBC driver drivers s will will run your your progr program am.. Only Only drivers that pass the JDBC driver test suite can be designated JDBC COMPLIANT. The JDBC-ODBC Bridge allows ODBC drivers to be used as JDBC drivers. It was implemented; as a way to get JDBC off the ground quickly, a long term will provide a way to access some of the less popular DBMS if JDBC drivers are not implemented for them.
JDBC-ODBC Bridge: ODBC driver is the only driver that can be used with the multiple databases and is vendor independent. The The ODBC ODBC inte interf rfac ace e rema remain ins s co cons nsta tant nt no ma matt tter er whic which h database is used. This means that this type of JDBC driver only only need needs s to spea speak k only only one one lang langua uage ge ODBC ODBC.. The The JDBC JDBC--
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 mo st co comm mmon on of this this type ype of driv driver er.. Thes These e driv driver ers s are are implemented using Native Code.
Type 1 drivers can be used for the following implementations:
Quick system prototyping. Three-tier database systems.
Database systems that provide an ODBC driver but not a JDBC driver. Low cost database solution where an ODBC driver is already present.
Native-API-Party-Java Driver: This makes use of local native libraries to comm co mmun unic icat ate e with with the the data databa base se.. The The driv driver er does does this this by making call o the locally installed native call level interface (CLI (CLI). ). The The CLI CLI libr ibraries ries are resp esponsi onsibl ble e for for the the actua ctuall communication with the database server. These drivers wrap a thin thin layer layer around around databa database-s se-spec pecifi ific c native native code code libra librarie ries. s. Since Since these these driver drivers s are implem implement ented ed using using native native code, code, in some cases hey have better performance than their all-Java counterparts. They They add an elemen elementt of risk, risk, howeve howeverr, becaus because e a defect in a driver native code section can crash the entire server. server. Another restriction res triction is the inability to use it in entrusted applet applets. s. Also, Also, since since the JDBC driver driver uses uses native native libra librarie ries, s, these these libr librar arie ies s must must be inst instal alle led d and and co conf nfig igur ured ed on each each
18
machine that will be using the driver. Type 2 drivers can be used for the following implementations. As an alternative to the JDBC-ODBC bridge. Since type 2 drivers interface directly with the database, they will perform better than the bridge. As a lowlow-co cost st data databa base se so solu luti tion on wher where e a ma majo jorr database system providing a type 2 drivers is already being used.
JDBC-Net-All-Java-Driver: Type 3 drivers are used in a three-tier solution and ca can n be depl deplo oyed over ver the Inte Intern rnet et.. Thes These e driv rivers ers commun com munica icate te with with som some e middle middle tier via a generi generic c networ network k protocol. The middle tier will most likely reside on a web or database server and in turn communicate with the database product via the JDBC-ODBC Bridge, either type 2 or type 4 drivers. These drivers are all Java and therefore are useful for applet deployment and safe fro Servlet deployment. Type 3 drivers can be used for fo r the following implementations Web-d eb-dep eplo loye yed d appl applet ets s that that do not not preinstallation or configuration or software.
requ requir ire e
any any
Secure systems where the database product will be protected behind a middle tier. Flexible solutions where there are different database products in use-the middle tier software can usually acts as an interface to any database product accessed via JDBC. Client Clients s requir requiring ing a small small footpr footprint int becaus because e size size of type 3 drivers is usually much smaller than all other types.
19
Java Application
DATABASE
JDBC Type III Driver
Database Server
Middle War Wa re Server
DBMS client
Figure 2.12
Native-protocol-All-Java-Driver: This This kind kind of driv driver er co conv nver erts ts JDBC JDBC ca call lls s into into the the network protocol used by DBMS directly. This allows a direct call ca ll from from the the clie client nt ma mach chin ine e to the the DB DBMS MS serv server er and and is pract practica icall solutio solution n for Intern Internet et access. access. Since Since many many of these these protocols are proprietary, the database vendors themselves will be the primary source and database vendors have these in progress. Type 4 drivers drivers understand understand database database specific specific networ networkin king g protoc protocols ols and can access access the databa database se direct directly ly without any additional software. The advantage of using type 4 drivers is that there are no layers of native code or middletier tier softwa software re betwee between n the client client and and the databa database se engine engine.. Type 4 drivers can be used for the following implementations .
When high performance is critical In environments where only one database product is in use. Web-deployed applets, depending upon the capabilities of the driver.
20
Java Application
JDBC Type IV Driver
DBMS Client Interface
DATABASE
Servlet In the early days of the web, a server could dynamically construct a page by creating a separate process to hand handle le each each clie client nt requ reques est. t. The The proc proces ess s woul would d open open connection to one or more databases in order to obtain the necessary information. It communicated with the web server via an interf interface ace known known as the Common Common Gatew Gateway ay Interf Interface ace (CGI). CGI allowed the separate process a read data from HTTP HTTP request request and write data to the HTTP response. A variety variety of diff differ eren entt lang langua uage ges s were were used used to buil build d CGI CGI prog progra rams ms including C, C++ and Perl. However, However, CGI suffered serious performance problems. Creating a separate process for each request was expensive, in terms of the processor and resources. It was also expensive to open and close database connections for each request.
Advantage of Servlet over Common Gateway Interface (CGI): Performa Performance nce is significan significantly tly better. Servlet Servlet execute within the address space of a web browser. Creating a separate process to handle each e ach request isn’t necessary. necessary. Figure 2.14 Servlets are platform-independent, because they are written in Java. Several web servers, from vendors such as Sun, Netscape and Microsoft offers the Servlet API. Prog Progra rams ms deve develo lope ped d for for this this AP APII ca can n be mo move ved d to any any of these environments without recompilation The Java security manager on the server enforces a set of restrictions to protect the resources on a server machine. You will see that some Servlets are trusted
21
and others are not trusted. The full functionality of the class libraries is available to a Servlet.
.
The Servlet Life Cycle: Three methods are central to the cycle of a Servlet: Init () Service () Destroy () They They are are im impl plem emen ente ted d by ever every y Serv Servle lett and and are are invoked at specific times by the server. server. Consider next a typical user scenario, to understand when these methods are called. First, assume that a user enters a Uniform Resource Loc ocat ator or (URL (URL)) to the the web web brow browse serr. The The Brow Browse serr then hen generates a HTTP request for this URL and sends it to the appropriate server. Second, the web server receives this HTTP request. The server maps this request to a particular Servlet. This This Servle Servlett is dynam dynamica ically lly retrie retrieved ved and locate located d into into the address space of the server. Third, the server invokes the init () method of the Servlet. This method is invoked only when the Servlet is first load loaded ed into into the the me memo mory ry.. You will will see see the the init initia iali liza zati tion on par param amet eter ers s ca can n be pass passed ed to the the Serv Servle lett so that that it ma may y configure itself. Fourt Fourth, h, the server server invoke invokes s the Servlet Servlets s servic service e () method, which is called to process the HTTP request. You will 22
see that the Servlet can read data that has been provided in the HTTP request, and may also formulate formulate an HTTP HTTP response response for the client. The Servlet remains in the servers address space and is available to process any other HTTP requests received from clients without creating any new process. The service () method is called for each HTTP request
Finally the server may decide to unload the Servlet from its memory. The algorithms by which this determination is made are specific to each server. The server calls destroy () method to relinquish any resources, such as file handlers that are allocated for a Servlet. Important data may be saved to a persistent store. The memory allocated for the Servlet and its objects can then be garbage collected.
Architecture of Servlet: The central abstraction in the JSDK is the Servlet interface. All Servlet implements this interface, either directly or more commonly by extending a class that implements it such as the Generic Servlet or the HTTP Servlet. The Servlet interface provides for methods that manage the Servlet and it’s developing a Servlet. When a Servlet accepts a call from client it receives two object one is the Servlet request and the other is the Servlet response. The Servlet request class encapsulates the 23
communication from back to the client. The Servlet request interface allows the Servlet access to the information such as the the name names s of the the para parame mete ters rs pass passed ed in by the the clie client nt,, the 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 retrie retrieve ve more more protoco protocoll specif specific ic data data Input Input stream stream,, throug through h whic which h the the Serv Servle lett gets gets data data from from clie client nts s that that are are usin using g appl applic icat atio ion, n, prot protoc ocol ols s such such as the the HTTP HTTP POST POST and and PU PUT T meth me thod ods. s. Subc Subcla lass sses es of Serv Servlet let requ reques estt allo allow w the the Serv Servlet let more protocol specific data. The Servlet Servlet respon response se interf interface aces s give give the Servle Servlett methods to the client. It allows the Servlet to set the content length and mime type of the reply and provides an output stream. Servlet output stream and a writer through which the Serv Servle lett ca can n send send the the repl reply y data data.. Subc Subcla lass sses es of Serv Servle lett response give the Servlet more protocol specific capabilities. For For exampl example, e, ‘HTTPServletResponse’ contai contains ns method methods s that that allo allow w the the Serv Servle lett to ma mani nipu pula late te the the HTTP HTTP spec specif ific ic head header er information. Servic Services es load load and and run Servle Servlet, t, which which then then accept accept zero or more requests from clients and return data to them. They They ca can n also also remo remove ve Serv Servle let. t. Thes These e are are the the step steps s of a Servlet life cycle. When When a serv servic ice e () loa oad ds a Serv Servle let, t, it run runs the the Servlet’s init ( ) method. Even though most Servlets are run in multi-threaded services, there are no concurrency issues during Servlet initialization. This is because the service calls the init () method once, when it loads the Servlet, and will not call it again again unless it is reloading the Servlet. The service () method cannot reload a Servlet until after it has removed the Servle Servlett by callin calling g destro destroy y () method methods. s. Initia Initializ lizati ation on is allowed to complete before the client requests are handled or the Servlet is destroyed. Each client’s request has its call to the service () meth me thod od run run in its its own own Servl Servlet et.. The The me meth thod od recei receive ves s the the client’s request and sends the client its response. Servlets can run multiple service () methods at a time. It is important therefore that the service () methods be written in a threadsafe manner until they are removed from the service. When a service removes a Servlet, it removes a Servlet by running the Servlet destroy () method. The method is run once; the
24
serv serviice will ill not run run it again gain until ntil after fter it relo reload ads s and and rein reinit itia iali lize zes s the the Serv Servle let. t. When When dest destro roy y () me meth thod od runs 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.
Apache web server Apache is currently the leading UNIX Web Server. It is high high perfor performan mance ce HTTPd HTTPd (HTTP (HTTP daemon daemon)) server server that that it roots in UNIX.A daemon is a UNIX background process that implements the server side of a protocol.
The Apache Web Server is a drop-in replacement for Nati Nation onal al Cent Center er for for Supe Superc rcom ompu puti ting ng Appl Applic icat atio ions ns (NCS (NCSA) A) HTTPd server. On a Web Server already running NCSA, one can simply compile Apache and the HTTPd binary from NCSA with the new Apache binary. The Apache Group develops it. Apache comes in source form and can be compiled on many platforms such as Linux, SCO UNIX and Solaris.
Apache HTTP Server:
Is a powerful, flexible, HTTP/1.1 compliant web server. server. Implements the latest protocols, including HTTP/1.1(RFC2616). Is highly highly configurab configurable le and extensible extensible with third-part third-party y modules. Can be customized by writing modules using the Apache module API. Provides full source code and comes with an unrestrictive license. Encou Encoura rage ges s user user feed feedba back ck thro throug ugh h new new idea ideas, s, bug bug reports and patches.
Apache Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServe JavaServerr Pages Pages technologie technologies.Apac s.Apache he Tomcat powers powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations.
Apache Tomcat Versions Servlet/JSP Spec Apache Tomcat version version 25
2.5/2.1 2.4/2.0 2.3/1.2 2.2/1.1
6.0.10 5.5.23 4.1.34 3.3.2
Apache Tomcat version 5.5 implements the Servlet 2.4 and JavaSer JavaServe verr Pa Pages ges 2.0 specifi specificat cation ions s from from the Java Java Community Community Process, and includes includes many additional additional features features that make it a useful platform for developing and deploying web applications and web services.
APACHE TOMCAT SERVER: Apache Tomcat is a web container developed at the Apache Software Foundation (ASF). Tomcat implements the servlet and the Java Server Pages (JSP) specifications from Sun Microsystems, providing an environment for Java code to run run in co coop oper erat atio ion n with with a web web serv server er. It adds adds tool tools s for for configuration and management but can also be configured by editing editing configura configuration tion files that are normally normally XML-form XML-formatted atted.. Tomcat includes its own HTTP server internally.
Environment: Tomcat is a web server that supports servlets and JSPs. The accompanying Tomcat Jasper compiler compiles JSPs into servlets. The Tomcat servlet engine is often used in combination with an Apache HTTP Server or other web servers. Tomcat Tomcat can also also functi function on as an indepe independe ndent nt web server server.. Earlie Earlierr in its development, the perception existed that standalone Tomcat was only suitable for development environments and other envi enviro ronm nmen ents ts with with mi mini nima mall requ requir irem emen ents ts for for spee speed d and and trans transact action ion handli handling. ng. Howeve Howeverr, that that percep perceptio tion n no longer longer exis exists ts;; Tom omca catt is incr increa easi sing ngly ly used used as a stan standa dalo lone ne web web server in high-traffic, high-availability high-availability environments. Tomcat is cross-platform, running on any operating system that has a Java Runtime Environment. The following properties can be specified, either as system properties, or by using a deployer.properties deployer.properties file located in the root folder of the deployer package:
build: The build folder used sed will be, by default, ${build}/webapp${path}. After the end of the execut execution ion of the com compil pile e target target,, the web applic applicati ation on WAR will be located at ${build}/webapp${path}.war.
26
webapp: Folder containing the expanded web appli applicat cation ion which which will will be com compil piled ed and valid validate ated. d. By default, the folder is myapp. myapp. path: path: Deployed Deployed context path of the web application application,, by default /myapp. url: Absolute URL to the manager web application of a running Tomcat Tomcat server, server, which will be used to deploy and undeploy the web application. By default, the deployer will will attemp attemptt to access access a Tomc omcat at instan instance ce runnin running g on localhost, at http://localhost:8080/manager http://localhost:8080/manager.. user userna name me:: Us User erna name me to be used used to co conn nnec ectt to the the Tomcat manager. pass passwo word rd:: Pas assw swor ord d to be used used to co conn nnec ectt to the the Tomcat manager
A web web appl applic icat atio ion n whic which h is prog progrram amma mati tica call lly y developed by the developer is stored in the webapps folder and WEB-INF folder also saved in that location which consists of folder folder named named classes classes which which suppor supports ts to run applic applicati ation on automatically. The deployer package includes a ready to use Ant script, with the following targets:
compil comp ile e (def (defau ault lt): ): Comp Compil ile e and and valid alidat ate e the the web web application. This can be used standalone, and does not need a running Tomcat server. The compiled application will will only only run run on the the as asso soci ciat ated ed Tom omca catt 5.0. 5.0.x x serve serverr rele releas ase, e, and and is not not guar guaran antee teed d to work work on anot anothe herr Tom omca catt rele releas ase, e, as the the co code de gene generrated ated by Jasp Jasper er depends on its runtime component. It should also be noted noted that that this this target target will will also also com compil pile e automa automatic ticall ally y any any Java Java source source file file locate located d in the /WEB-I /WEB-INF/ NF/cla classes sses folder of the web application. deploy: Deploy a web application (compiled or not) to a Tomcat server undeploy: Undeploy a web application start: Start web application reload: Reload web application stop: Stop web application
27
ORACLE9i 3.1.4.1 (DBMS):
Database
Management
Systems
A DBMS consists of a collection of interrelated data and a set of programs to access that data and to modify the data data.. The The co coll llec ecti tion on of data data is usua usuall lly y refe referr rred ed as the the “data “databas base” e”.. The databa database se contai contains ns inform informati ation on about about any any part partic icul ular ar ente enterp rpri rise se.. The The prim primar ary y goal goal of a DB DBMS MS is to provide an environment that is both convenient and efficient to use in retrieving and storing information into the database. Database systems are designed to manage large bodies of information. The management of data involves both the definition of the structure for the storage of information and and the the prov provis isio ion n of me mech chan anis isms ms for for the the ma mani nipu pula lati tion on of information. In addition the database system must provide for the the sa safe fety ty of info inform rmat atio ion n store stored d in the the data databa base se desp despit ite e crashes or attempts by users, the system must avoid possible anomalous results.
Characteri eristics Systems: • • •
•
• •
of
Database
Managem gement ent
It represents complex relationships between data. Keeps a tight control on data redundancy. Enforces user-defined rules to ensure that integrity of table data. Enfo Enforrces ces thr threat eat dat data ca can n be shar shared ed by diffe ifferrent ent applications. Enforces data access authorization. Have Have auto automa mati tic, c, inte intell llig igen entt back backup up and and reco recove very ry proc proced edure ures s for for data data inte interf rfac aces es via via whic which h user users s ca can n manipulate data.
The data is stored in the form of tables. The tables consist of one or more records or rows. Each row has one or more fields or columns. The unit of data is accessed by a row and column intersection. A column that has a unique set of values through out the table can be used to access the data. Such a column is called the “Key” or the “Primary Key”. If no such single column exists, using a set of columns such that when when com combin bined ed they they are unique unique throug throughou houtt the table table can access the data. These set of columns are called “Composite Key”.
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 ons within networks/time sharing environments. Export and import the data. • • • • • •
•
3.1.4.2 Data Definition Language (DDL): A database schema is especially by a set of definitions, which are expressed by a special language called Data Definition Definition Language. Language. The result is a set of tables, tables, which are stored in a special file as data dictionary. dictionary.
3.1.4.3 Data Manipulation Language (DML): • • •
By data manipulate we mean that The retrieval of information stored in the database. The insertion of information into the database. The deletion of information from the database.
The goal should be to provide efficient human inte intera ract ctio ion n with with the the syst system em.. The The DM DML L is a lang langua uage ge that that enables us to a view data as organized by the appropriate data model. There are basically two types of data manipulation languages, they are: •
•
Procedural: DML requires the user to specify what data is needed and how to get it. Here the data gets modified in each procedure and execution is in the form of procedure by procedure. Non-Procedural: DML requires the user to specify what data is needed without specifying how to get it. The The form form is based based on certa certain in even events ts that that are are even eventt driven driven.. On procedu procedural ral DML is usuall usually y easier easier to learn learn than procedural DML.
29
A query is a statement requesting the retrieval of inform informati ation. on. The portio portion n of DML that that involv involves es inform informati ation on retrieval is called “Query Language”. Hence sometimes DML is also called as query language.
Overview: An overview of the changes that have been made to Oracle 9i to improve the following technical aspects :
database performance ease of management scalability security availability
Windows 2000 integration and application areas:
Internet content management ecommerce integration packaged applications Business Intelligence
All these topics will be explored farther in the coming issues so for this issue I have provided only brief details about each area of improvement, just to give you a feel for what has changed, so that you can decide whether or not to take advantage of them.
Oracle 9i Performance Improvements Performance is always a big issue with databases, there are innumerable books on the subject and I've just written a whole series of articles on performance, so what's new in Oracle9i in the way of performance enhancements ? Well, I guess the biggest improvements have been to Parallel Parallel Server which Oracle now calls Real Application Clusters and which allow applications to use clustered servers without modification. Other improvements include:
native compilation of PL/SQL
30
reduction in latch contention (SGA locks) and I/O improvements better Java performance (better compilation, improved garbage collection) distributed database performance enhancements
Oracle 9i Manageability Enhancements Ease of management of the database has always been a bone of contention, especially configuration of rollback segments and such like, so Oracle have made great strides to improve manageability as the complexity of the database has increased. These improvements include: automatic rollback segment management many operations management enhancements Oracle Enterprise Manager enhancements
Oracle 9i Scalability Enhancements As the demand for databases to be able to support more and more users continues, issues of scalability become more important. Improvements in this area consist of:
Real Application Clusters - new servers can be added as required reduced resource requirements per user improved resource management features to give greater control at lower levels
Oracle 9i Security Enhancements As the number of users increase and the locations and types of users become more diverse, better security (and privacy) features become essential. The security improvements for Oracle 9i are:
enhanced 3-tier security (integration with LDAP ...) improved hosting security (through use of virtual private databases), fine-grained auditing and single sign-on improved user security (more password management features, etc.) ability to encrypt stored data row-level access control (Oracle Label Security)
Oracle 9i Availability 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:
disaster recovery enhancements (standby database management, LogMiner) reduction in off-line maintenance requirements (CREATE TABLE ... AS SELECT... etc.) faster and more precise database repair (after corruption/instance failure) enabling queries to go back in time with flashback queries
INTERNET CONTENT MANAGEMENT Oracle 9i can be used for the storage and manipulation of many different types of data. The new features are: Internet File Store improvements searching/indexing of multimedia and XML data support for collaborative projects via the creation of shared workspaces, allowing multiple versions of content to exists simultaneously ability to create applications to make use of location information of clients and services (e.g. for use with mobile phones)
WINDOWS INTEGRATION Oracle 9i has been enhanced to take advantage of the new Windows features including:
integration of single sign-on and PKI with Active Directory and Microsoft Certificate Store better integration with IIS and Microsoft's Transaction Services and Message Queuing enhanced development features (Oracle Data Objects etc.)
32
3.2.CLIENT SIDE DESIGN Hyper Text Markup Language (HTML) HTML is a static language used to create hypertext documents that have hyperlinks embedded in them. You can build web pages. It is only formatting language and not a prog progrram amm ming ing lan languag uage. Hype Hyperl rlin inks ks are are unde underl rlin ined ed or emphasized words or locations in a screen that lead to other documents. WWW is a global, interactive, graphical, hypertext information system. The behind hypertext is that instead of reading text in rigid linear structure you can easily jump from point to anot anothe herr poin point. t. You ca can n navi naviga gate te thro throug ugh h the the info inform rmat atio ion n based on your interest and preferences.
Hyper Media: HTML pages audio and video files linked to then are Hyper Media.
HTML is Platform Independent: If you can access Internet, you can access WWW, irre irresp spect ectiv ive e of your your Oper Operat atin ing g Syste System m and and the the Oper Operat atin ing g System of Web Server you are accessing. All you require is to view and download the HTML files, which are on the WWW, are browser and Internet connections. HTML is a language for describing structured documents. documents. HTML describes describes the structure structure of documents-l documents-lists, ists, heading, and paragraph, etc. Elements of web document are thro throug ugh h the the usag usage e of HTML HTML tags tags.. It is tags tags that that desc descri ribe be documents. Anything that is not a tab is part of a document itself.
HTML does not describe Page Layout: Word for Windows or Lotus AmiPro for example, has differ different ent styles styles for Headin Headings, gs, fonts, fonts, size size and identi identifica ficatio tion. n. HTML does not have all these. Based on the platform, exact placement or appearance of any element will change. There may be or may 33
not not be font fonts s inst instal alle led. d. So your your form format atte ted d text text will will appe appear ar differently on differently on different machines/platforms. By separating the structure of the document and its appearance, a program that reads and understands HTML can make form forma attin tting g deci decisi sion on base based d on ca capa pabi bili liti ties es of the the individual platform. In addition to providing the networking functions to retrieve retrieve documents, web browsers browsers are also HTML formatters. formatters. They parse and format documents and display them on the screen. Different browsers show data differently. differently.
Advantages: An HTML document is a small and hence easy to send over the net. It is small because it does not include format information. HTML documents are cross platform compatible and device independent. You only need HTML readable browser to view them. Font names, locations etc are required.
Java Script: JavaScript is popular scripting language that lets you embed your programs and run these in a web browser. These programs can be placed in a <SCRIPT> tag with a language property setting to “JAVASCRIPT”, which is in either or tag. It makes the static web page that developed using static HTML tags to dynamic by using Java language syntax and its attributes and so is case sensitive. JavaScript is used to perform the client side validations dynamically at run time. It is said to be an Object based programming language where it has a rich support of predefined objects, which can be used directly without any creation of an instance. Some of these objects are document, form, form, frame, frame, histor history y, window window, location location…et …etc. c. Each Each of the objects, will have its own methods and properties. Methods can ca n be used used to perf perfor orm m so some me ac acti tion ons s with with that that obje object ct.. Besides performing actions using methods one can also read and change settings in those objects using properties. JavaScript, like Java, also supports a rich set of events events such as onAbort, onAbort, onClick, onClick, onMouseMov onMouseMove, e, onLoad onLoad and onSubmit etc, to perform dynamic executions on occurrence
34
of som some e corresp correspond onding ing event events. s. A handle handlerr can handle handle each each event occurrences.
Uses of JavaScript: JavaScript provides a fairly complete set of built-in func functi tion ons s and and co comm mman ands ds,, enab enabli ling ng you you to perfo perform rm Math Math calcu ca lcula lati tion ons, s, ma mani nipu pula late te stri string ngs, s, play play so soun unds ds,, open open new new windows and new URLs, and access and verify user input to your Web forms. Code to perform these functions can be embedded in a page and executed when the page is loaded. We can also write write functi functions ons contai containin ning g code code that that is trigge triggered red by events events you specify. You can write a JavaScript method that is called when the user clicks submit button of a form, for example, or one that is active when the user clicks a hyperlink on the active page. JavaScript can also set the attributes, or properties, of web page elements, Active-x controls, Java Applets and other objects present in the browser. This way, you can change the behavior of plug-ins or oth other obje object cts s wit without hout havi havin ng to rew rewrite rite them them.. Your our JavaScript code could automatically set the text of an Active-x Label Control, for example, based on what time the page is viewed. JavaScript commands are embedded in your HTML docume documents nts.. Embed Embeddin ding g Java Java Script Script in your your pages pages requir requires es only only one new HTML: HTML: element element..
T> and . T>. The <SCRIPT> element takes the attribute LANGUAGE, which the scripting language to use when evaluating the script, and SRC, SRC, whic which h ca can n be used used to load load sc scri ript pt from from an exte extern rnal al source. The following are some simple rules to help you understand how the language is structured: 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, JavaSc JavaScrip ript, t, on the other other hand, hand, is intend intended ed to provid provide e a quick quicker er and and lang langua uage ge for for enha enhanc ncin ing g web web page pages s serve servers rs.. However, JavaScript is limited itself to perform only the client side validations but not the server side validations.
Java Java Sc Scri ript pt is Nets Netsca cape pe’’s cros cross– s–pl plat atfo form rm,, obje object ct-base based d sc scri ript ptin ing g lang langua uage ge for for clie client nt serv server er appl applic icat atio ion. n. JavaScript is mainly used as a client side scripting language. This means that JavaScript code is written into an HTML page. When a user requests an HTML page with JavaScript in it, the script is sent to the browser and it's up to the browser to do something with it. JavaScript can be used in other contexts than a Web browser. Netscape created server-side JavaScript as a CGI-language that can do roughly the same as Perl or ASP. Fortu Fortunat nately ely mos mostt browse browsers rs can handle handle JavaSc JavaScrip riptt nowadays, but of course some browsers do not support some bits of script. Types of Java Script:
Navi Naviga gato torr Java Java Sc Scri ript pt also also ca call lled ed clie client nt-si -side de Java Java Script.
Live Live Wire Wire Java Java Script Script also also called called server server-sid -side e Java Java Script.
Using Usin g Java Java Sc Scri ript pt,, dyna dynami mic c HTML HTML page pages s ca can n be created that process user input and maintain persistent data using special objects, files and relational databases. Browser interprets JavaScript statements embedded in an HTML page. Netsca Netscape pe Naviga Navigator tor 2.0 and Intern Internet et Explor Explorer er 3.0 version versions s and and late laterr reco recogn gniz ize e Java Java Sc Scri ript pt.. Thro Throug ugh h Java JavaSc Scri ript pt Live Live Connect functionally, application can access Java and CORBA dist distri ribu bute tedd-ob objec jectt appl applic icat ation ions. s. Navi Naviga gato torr 3.0 3.0 and and late laterr versions supports Live Connect.
36
Client- side JavaScript
CLIENT-SIDE ADDITION (SUCH AS WINDOW AND HISTORY)
CLIENT-SIDE
CORE JAVASCRIPT CORE LANGUAGE FEATURES SUCH AS VARIABLE, FUNCTIONS AND LIVE CONNECT
SERVER-SIDE ADDITIONS (SUCH AS SERVER AND DATABASE)
SERVER-SIDE
JavaScript Architecture Server-side and client-side share the same core language (ECMA-262), the scripting language standardized by the Europ European ean stand standard ards s body body which which contai contains ns core core objects objects,, other other featur features es like like expres expression sions, s, statem statement ents s and opera operator tors. s. 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.
CLIENT-SIDE JAVASCRIPT FEATURES : Client–side JavaScript has expressly been developed for use in a web browser in conjunction with HTML pages. This has certain consequences for security. JavaScript cannot read files from or write them to the file fi le sy syste stem m on th the e co comp mput uter er.. Th This is wo woul uld d be a cl clear ear security hazard Java vaScri Script pt can cannot not exe execut cute e an any y oth other er pr progr ograms ams.. Thi This s Ja would also be unacceptable. JavaScript cannot establish any connection to whatever computer, except to download a new HTML page or to sen send mail. ail. Thi This, too too, woul ould crea create te unacc naccep epta tab ble hazards.
The Client-Side JavaScript following features:
also
has
the
Controls Document’s appearance and content Control the browser Interact with the HTML forms Interact with the user Read and write client state with cookies
Server- Side JavaScript Features
Embedded in HTML page Executed at the server Pre-complied for faster response Access to Server-side objects Encapsulation of the request
38
JSP Introduction to JSP (Java Server Pages): Java Server Pages (JSP) is a Java technology that allows allows softw software are develo developer pers s to dynami dynamical cally ly gener generate ate HTML, HTML, XML or other types of documents in response to a Web client reques request. t. The techno technolog logy y allows allows Java Java code code and certai certain n prepredefined actions to be embedded into static content. The JSP syntax adds additional XML-like tags, called JSP JSP ac acti tion ons, s, to be used used to invo invoke ke buil builtt-in -in fun functio ctiona nali lity ty.. Additionally, the technology allows for the creation of JSP tag libraries that act as extensions to the standard HTML or XML tags. tags. Tag libra libraries ries provid provide e a platfo platform rm indepe independe ndent nt way way of extending the capabilities of a Web server. JSPs JSPs are co com mpile piled d int into Jav Java Ser Servlet vlets s by a JSP JSP compiler. A JSP compiler may generate a servlet in Java code that is then compiled by the Java compiler, compiler, or it may generate byte code for the servlet directly. directly. "JavaServer Pages" Pages" is a technology released by Sun.
JSP Syntax: A Java Server Page may be broken down into the following pieces:
static data such as HTML, JSP directives such as the include directive, JSP scripting elements and variables, JSP actions,
Static data Static data is written out to the HTTP response exactly as it appears in the input file. Thus a normal HTML page with no embedded java or actions would be valid JSP input. In that case, the same data would be sent in the response each e ach and every time by the web server to the browser.
JSP directives JSP directives control how the JSP compiler generates the servlet. The following directives are available:
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 one prov provid ided ed by the the C prep prepro roce cesso ssorr. Incl Includ uded ed files files generally have the extension "jspf" (for JSP ragment):<%@ include file="somefile.jspf" %>
Page – There are several options to the page directive.
Import
results in a Java import statement being inserted into the resulting file
contentType specifies the content that is generated. This should be used if HTML is not used or if the character set is not the default character set.
errorPage
indicates the page that will be shown if an exception occurs while processing the HTTP request.
isErrorPage if set to true, it indicates that this is the error page.
isThreadSafe indicates if the resulting servlet is thread safe.
<%@ page import="java.util.*" %> //example import <%@ page contentType="text/html" contentType="text/html" %> //example // example contentType <%@ page isErrorPage=false %> //example for non error page <%@ page isThreadSafe=true %> //example for a thread safe JSP
Note: Only the "import" page directive can be used multiple times in the same JSP.
taglib – The taglib directive indicates that a JSP tag library is to be used. The directive requires that a prefix be specified (much like a namespace in C++) and the URI for the tag library description.
<%@ taglib prefix="myprefix" uri="taglib/mytag.tld" %>
40
4.2.4 JSP Implicit Objects The following JSP implicit objects are exposed by the JSP container and can be referenced by the programmer:
out – The JSPWriter used to write the data to the response stream. page – The servlet itself. pageContext – A PageContext instance that contains data associated with the whole page. A given HTML page may be passed among multiple JSPs. request – The HTTP request object. response – The HTTP response object. session – The HTTP session object that can be used to track information about a user from one request to another. config – Provides servlet configuration data. application – Data shared by all JSPs and servlets in the application. exception – Exceptions not caught by application code.
Scripting elements: There are three basic kinds of scripting elements that allow java code to be inserted directly into the servlet.
A declaration tag places a variable definition inside the body of the java servlet class. Static data members may be defined as well.
<%! int serverInstanceVariable = 1; %>
A scriptlet tag places the contained statements inside the _jspService() method of the java servlet class.
<% int localStackBasedVariable = 1; out.println(localStackBasedVariable); out.println(localStackBasedV ariable); %>
An expression tag places an expression to be evaluated inside the java servlet class. Expressions should not be terminated with a semi-colon .
<%= "expanded inline data " + 1 %>
41
JSP actions JSP actions are XML tags that invoke built-in web server functionality. functionality. The following actions are provided:
jsp:include
Similar to a subroutine, the Java servlet temporarily hands the request and response off to the specified JavaServer Page. Control will then return to the current c urrent JSP, JSP, once the other JSP has finished. Using this, JSP code will be shared between multiple other JSPs, rather than duplicated. Can be used inside a jsp:include, jsp:param jsp:forward or jsp:params block. Specifies a parameter that will be added to the request's current parameters. Used to hand off the request and response jsp:forward to another JSP or servlet. Control will never return to the current JSP. Older versions of Netscape Navigator and jsp:plugin Internet Explorer used different tags to embed an applet. This action generates the browser specific tag needed to include an applet. The content to show if the browser does not jsp:fallback support applets. jsp:getProperty Gets a property from the specified JavaBean. jsp:setProperty Sets a property in the specified JavaBean. The The sc scop ope e attr attrib ibu ute ca can n be requ reques est, t, page page,, sess sessio ion n or application. It has the following meanings: request — the attribute is available for the lifetime of the request. request. Once the request request has been processed processed by all of the JSPs, the attribute will be de-referenced. page — the attribute is available for the current page only. session — the attribute is available for the lifetime of the user's session. application — the attribute is available to every instance and is never de-referenced. Same as a global variable.
42
JSP Standard Tag libraries (JSTL) In addition to the pre-defined JSP actions, developers may add their own custom actions using the JSP Tag Exte Extens nsio ion n AP API. I. De Dev velop eloper ers s writ write e a Jav Java clas class s that that implements one of the Tag Tag interfaces and provide a tag library XML XM L descr descrip ipti tion on file file that that speci specifi fies es the the tags tags and and the the java java classes that implement the tags. JSP pages are compiled into servlets ,so theoritically you coul ould write servlets ets to support your web-based appl applic icat atio ions ns.H .How owev ever er ,JSP ,JSP tech techno nolo logy gy was desi design gned ed to simp simpli lify fy the the proc process ess of crea creati ting ng page pages s by sepa separa rati ting ng web web prese present ntat atio ion n from from web web conte content nt.In .In ma many ny appl applic icat atio ions ns ,the ,the response sent to the client is a combination of template data data and dynamically generated data.In this situation ,it is much easier to work with jsp than to do everything with servlets. Jsp technology is the result of industry collaboration and is designe designed d to be an open, open, indust industry ry-sta -standa ndard rd method method supp suppor ortting ing num numerou erous s serv server ers, s, brow browse sers rs and tols tols.j .jsp sp techno technolog logy y speeds speeds develo developme pment nt with with reusab reusable le com compon ponent ents s and tags tags ,instead of relying relying heavily heavily on scripting scripting within within the page itself. All jsp implem eme entations support a jav java prog progra ramm mmin ing g lang langua uage ge base based d scri script ptin ing g lang langua uage ge,, whic which h prov proviides des inhe inhere rent nt sc scal ala abili bilitty and and sup support port for for co com mplex plex operations.
43
3.3 DATA FLOW DIAGRAMS :
44
VISITOR
45
JAILER
3.4 UML DIAGRAMS
USECASE DIAGRAM: VISITOR LEVEL HIGH-LEVEL:
DESCRIPTION: This use-case diagram describes the registration process for the new visitors and the login process for the registered visitors. Once he logs in, if he is proved to be auth authen enti tica cate ted d he ca can n eith either er put put a requ reques estt to visi visitt a particular prisoner or he can view his visit details.
46
USECASE DIAGRAM: JAILER LEVEL HIGH-LEVEL: DESCRIPTION: This use-case diagram describes that after the jailer logs logs in, in, he ca can n ac acce cess ss eith either er of the the mo modu dule les s and and he ca can n retr retriev ieve e the the pris prison oner ers s pers person onal al deta detail ils s or ca case se deta detail ils s or parole details or the education and training he is undergoing in the the pris prison on.. He ca can n also also get get the the list list of pris prison oner ers s to be released on a day, the next day, the next week, the next month, or any given duration of time. He also has previleges to update the details of the prisoner prisone r.
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. register.
ACTIVITY DIAGRAM:JAILER
48
DESCRIPTION: This activity diagram describes the flow in which the activities of the jailer occur. First the jailer logs in and if he is valid.he is provided access to all of the modules mentioned above. He has previlege to update the details of the prisoner. Once he completes his work, he logs out.
CLASS DIAGRAM: JAILER DESCRIPTION:
49
CLASS NAME
Jailer
Nominal Role
Case Register
Parole Re Register
Education
Training In-Out Re Register
METHODS
DESCRIPTION
1.This method enables us to view the details of all the prisoners. 2. This method 1. viewA iewAll ll () () enables us to 2. upda pdate () update the 3. newRe newRegis gistr trati ation on () details of all the prisoners. 3. This method enables a new jailer to get registered. This method enables us to getNomDetails() retrieve the personal details of the prisoner. This method enables us to getCaseDetails() retrieve the case details of the prisoner. prisoner. This method enables us to getParoleDetails() retrieve the parole details of the prisoner. prisoner. This method enables us to retrieve the getEduDetails() education details he is undergoing in the prison. This method enables us to getTrainyDetails() retrieve the training details. 1.getPrisonerWise() This method 2.getVisitorWise() enables us to retrieve the in-
50
Automated Release Dairy
getReleaseDetails()
out details of both prisoners and visitors. This method enables us to retrieve the list of prisoners who are going to be released on a given date.
`
CLASS DIAGRAM: VISITOR DESCRIPTION: CLASS NAME
METHODS
egistration
getRegistered()
Login
validate()
Visit Register
1.viewDetails() 2.submitRequest()
DESCRIPTION This method enables the visitors to get registered. This method authenticates the visitor. 1.This method allows the visitor to view his visit details. 2.This method allows the visitor to place a request to visit the prisoner. prisoner.
51
USECASE DIAGRAM: VISITOR LEVEL LOW-LEVEL: DESCRIPTION: This use-case diagram describes that if a visitor is a new one, he gets registered and during registration he has to fill the details like visitor name, visitor Id, relation to the prisoner, his gender, his age, prisonerId of prisoner he wants to visit. Once he logs in, he has access to visit register in which he can place a request by entering prisonerId and visit time. He can also retrieve his visit details. He immediately gets the approval of his request from the jailer. jailer.
52
USECASE DIAGRAM: JAILER LEVEL LOW-LEVEL DESCRIPTION: Once the jailer logs in and proves to be valid,he has access to the following modules:
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 pris prison oner er shou should ld be ca capt ptur ured ed.. This This must must incl includ ude e the 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 given duration of time. The system should consider consider the reduction of sentence length due to various considerations.
53
Parole register: This module should track all prisoners on parole and provide necessary reports on this data.
Education Education:: This module module consists consists of information information about about his present qualification ,the course he is undergoing and the duration of the course.
Training: This module consists of the information about the work he is assigned and the pay he is given for the work.
In-out register: An in-out register will track all prisoners and others who move in and out for various reasons.
Vario arious us stat status us repo report rts s and and reports are to be generated.
demo demogr grap aphi hica call
anal analys ysis is
SEQUENCE DIAGRAM:VISITOR
54
55
56
NOMINAL_ROLE: FIELD-NAME
DATA TYPE
CONSTRAINT
PRISONERID PRISONERNAME GENDER QUALIFICATION PADDRESS ARTICLES TYPE ENTRY_DATE EXIT_DATE HANGING_DATE V1NAME V2NAME V3NAME V4NAME STATUS IMAGE V1PHOTO V2PHOTO V3PHOTO V4PHOTO S1 S2 S3 S4
VARCHAR2(10) VARCHAR2(!0) VARCHAR2(10) VARCHAR 2(10) VARCHAR2(50) VARCHAR2(10) VARCHAR2(10) DATE DATE DATE VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(20) VARCHAR2(100) VARCHAR2(100) VARCHAR2(100) VARCHAR2(100) VARCHAR2(100) VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(10)
PRIMARY KEY NOT NULL NOT NULL NOT NULL NOT NULL NOTNULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL
DESCRIPTION: This table is capable of storing the personal details of the prisoner like demographic details, digital photos comprising different views of the prisoner and the list of articles surrendered by the prisoner. prisoner.
PAROLE_REG: FIELD NAME
DATA TYPE
CONSTRAINT
PAROLEID
VARCHAR2(10)
PRIMARY KEY 57
PRISONERID PRISONERNAME REF_NAME REF_ADD EXIT_DATE ENTRY_DATE LAST_VISITDATE CASEID
VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(50) DATE DATE DATE VARCHAR2(10)
FOREIGN KEY NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL FOREIGN KEY
DESCRIPTION: This table consists of the details of all the prisoners on parole and the name of the referee, his/her address and the duration of the parole.
CASE_REG: FIELD NAME
DATA TYPE
CONSTRAINT
CASEID CTYPE PRISONERID DESCRIPTION
VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(50)
PRIMARY KEY NOT NULL FOREIGN KEY NOT NULL
DESCRIPTION: This table consists of the details of the cases against the prisoner and the type of the crime he did like murder, theft, forgery and counterfeiting.
EDUCATION: FIELD NAME
DATA TYPE
CONSTRAINT
EDU_ID PRISONERID COURSE_ID PRISONERNAME
VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(10)
PRIMARY KEY FOREIGN KEY FOREIGN KEY NOT NULL
DESCRIPTION: This table comprises of the education details like the course he is undergoing.
58
COURSE: FIELD NAME
DATA TYPE
CONSTRAINT
COURSE_ID COURSENAME UNIVERSITY/SCHOOL
VARCHAR2(10) VARCHAR2(50) VARCHAR2(50)
PRIMARY KEY NOT NULL NOTNULL
DESCRIPTION: This table describes the various courses offered to the prisoners.
TRAINING: FIELD NAME
DATA TYPE
CONSTRAINT
TRAINING_ID PRISONERID WORK_ID PRISONERNAME
VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(10)
PRIMARY KEY FOREIGN KEY FOREIGN KEY NOT NULL
DESCRIPTION: This table has all the training details being undertaken by the prisoners.
WORK: FIELD NAME
DATA TYPE
CONSTRAINT
WORK_ID WORKNAME
VARCHAR2(10) VARCHAR2(50)
PRIMARY KEY NOT NULL
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: FIELD NAME
DATA TYPE
CONSTRAINT
VISITOR_ID PRISONERID PASSWORD GENDER AGE PRISONERNAME VISITORNAME RELATION ADDRESS SECURITYQUES ANSWER
VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) NUMBER VARCHAR2(10) VARCHAR2(10) VARCHAR2(10) VARCHAR2(50) VARCHAR2(60) VARCHAR2(30)
PRIMARY KEY FOREIGN KEY NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NU NULL NOT NULL
DESCRIPTION: This table contains the details of the visitor like his/her name, relation to the prisoner, prisoner, address, age, gender ,the security question ans answer in case he forgets his password,etc.
VISITREGISTER: FIELD NAME
DATA TYPE
CONSTRAINT
VISITOR_ID PRISONERID VISITDATE STATUS
VARCHAR2(10) VARCHAR2(10) DATE VARCHAR2(10)
FOREIGN KEY FOREIGN KEY NOT NULL NOT NULL
DESCRIPTION: This table maintains the details of the visitor like the date on which he visited the prisoner with the Id, prisonerId and the status of his request to meet the prisoner (accept/reject) and the corresponding remarks.
STAFF1:
60
FIELD NAME
DATA TYPE
CONSTRAINT
STAFF_ID STAFFNAME DESIGNATION IMAGE DOJ ADDRESS
VARCHAR2(10) VARCHAR2(10) VARCHAR2(20) VARCHAR2(100) DATE VARCHAR2(50)
PRIMARY KEY NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL
DESCRIPTION: This table maintains the details of the staff members like like his/her name, their Id , designation ,his/her image ,date of joining(DOJ) etc.
LOGIN: FIELD NAME
DATA TYPE
CONSTRAINT
ID PASSWORD
VARCHAR2(10) VARCHAR2(10)
PRIMARY KEY NOT NULL
DESCRIPTION: This table contains the login details of the staff like their ID and password.
61
Implem Implement entati ation on is the process process of havin having g system systems s 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 the risk risk as asso soci ciat ated ed with with its its use, use, syst system ems s deve develo loper pers s ma may y 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 consid considered ered.. Regard Regardless less of the implem implement entati ation on strate strategy gy used, developers strive to ensure that the system’s initial use in trouble-free. Once installed, applications are often used for many year years. s. Howe Howeve verr, both both the the orga organi niza zati tion on and and the the users users will will change, and the environment will be different over weeks and months. Therefore, the application will undoubtedly have to be maintained; modifications and changes will be made to the soft so ftw ware, are, file files, s, or proce rocedu dure res s to meet eet em emer ergi gin ng user ser requirements. Since organization systems and the business envi enviro ronm nmen entt unde underg rgo o co cont ntin inua uall chan change ge,, the the info inform rmat atio ion n systems should keep pace. In this sense, implementation is ongoing process. Evaluation of the system is performed to identify its streng strengths ths and weakne weakness. ss. The actual actual evalu evaluati ation on can occur occur along any of the following dimensions. Operational Evaluation: assessment of the manner in which the system functions, including ease of use, response time, suitability of information formats, overall reliability, and level of utilization. Organization Impact: Identification and measurement of benefits to the organization in such areas as financ financial ial concern concerns s opera operatio tional nal effici efficienc ency y, and com compet petiti itive ve impact. Includes impact on internal and external information flows. User ser Mana Manage gerr Ass sses essm smen entt: Eval Evalua uati tion on of the the attitudes of senior and user mangers within the organization, as well as end-users. Develo Deve lop pment ent Perfo erform rman ance ce:: Evalua aluati tion on of the the development process in accordance with such yardsticks as overall development time and effort, conformance to budgets
63
and and stan standa dard rds, s, and and othe otherr proj projec ectt manag anagem emen entt crit criter eria ia.. Includes assessment of development methods and tools. Unfort Unfo rtun unat atel ely y syst system em eval evalua uati tion on does does not not alw always ays rece receiv ive e the the atte attent ntio ion n it me meri rits ts.. Wher Where e prop proper erly ly ma mana nage ged d howe howeve verr, it prov provid ides es a grea greatt deal deal of info inform rmat atio ion n that that ca can n improve the effectiveness of subsequent application efforts. System Implementation is used to bring a developed system or sub system into operational use and turning it over to the user. user. It involves involves programme programmerr, users and operation operational al management. It also needs to introduce and train the people to work with the new system.
64
System testing is the stage of implementation that is aime aimed d at ensu ensuri ring ng that that the the syst system em work works s ac accu cura rate tely ly and and efficiently for live operation commences. Testing is vital to the succ succes ess s of the the syst system em.. Syst System em test testin ing g ma make kes s a logi logica call 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 Testing are:
Unit Testing: Unit test Unit testin ing g focu focuse ses s veri verifi fica cati tion on effo effort rts s on the the smallest unit of the software design , the module . This is also know known n as “Mod “Modul ule e Testi esting ng” ” . The modules are test ested separately. This testing carried out during programming stage itself . In this this test testin ing g each each mo modu dule le is foun found d to be work workin ing g sati sa tisf sfac acto tori rily ly as rega regard rds s to the the expec expecte ted d outp output ut from from the the module.
Integration Testing: Data can be grossed across an interface ; one module can have adverse efforts on another . Integration testing is system systemati atic c testin testing g for constr construct uction ion the progr program am struct structure ure while at the same time conducting tests to uncover errors associated with in the interface. The objective is to take unit test tested ed mo modu dule les s and and buil build d a prog progrram stru struct ctur ure e . All All the the modules are combined and tested as a whole . Here correction is difficult because the isolation of cause is complicate by the vast expense of the entire program. Thus in the integration testing stop, all the errors uncovered are corrected for the text testing steps.
Validation Testing : At the conclusion of integration testing software is completely assembled as a package, interfacing errors have been uncovered and corrected and a final series of software tests begins begins, validati validation on test begins begins. Validat alidation ion test test can be defi define ned d in ma many ny ways ways. But But the the simp simple le defi defini niti tion on is that that validation succeeds when the software function in a manner that that ca can n rea reaso son nably ably expe expect cted ed by the the cust custom omer er. Afte Afterr valid alidat atio ion n test test has has been been co cond nduc ucte ted d one one of two two poss possib ible le conditions exists. One is the functi function on confirm to specifications and deviation from specification is is create created. d. Propos Proposed ed system system
or perfor performan mance ce chara characte cteris ristic tics s are accepted and the other is uncovered and a deficiency list under under consid considera eratio tion n has been been
66
tested by using validation testing and found to be working satisfactorily.
Output Testing: After performing validation testing, the next step is output testing of the proposed system since no system could be useful if it does not produce the required output in the specified format. Asking the users about the format required by them tests the outputs generated by the system under consideration. Here the output format is considered in two ways, one is on the screen and other is the printed format. The output format on the screen is found to be correct as the format was designed in the system designed phase according to the user needs. For the hard copy also the output comes as the specified requirements by the users. Hence output testing does not result any corrections in the system.
User Acceptance Testing: User acceptance of a system is the key factor of the success of any system. The system under study is tested for the user acceptance by constantly keeping in touch with the pros prospe pect ctiv ive e syst system em user users s at the the time time of deve develo lopi ping ng and and making changes wherever required.
Test Data: Takin aking g vari variou ous s kind kinds s of test test data data does does the the abov above e test testin ing. g. Prep Prepar arat atio ion n of test test data data play plays s a vita vitall role role in the the system testing after preparing the test data the system under study is tested using the test data. While testing the system by usin using g the the test test data data erro errors rs are are agai again n unco uncove vere red d and and corrected by using above testing steps and corrections are also noted from the future use.
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 frontend 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:
This form enables the jailer to login into their account.
73
NEW PRISONER WINDOW:
This is the window that appears when the jailer clicks prisoner details.
74
IMAGES:
75
76
77
78
79
80
81
82
The The “PRI “PRISO SON N MANA MANAGE GEME MENT NT SYST SYSTEM EM “ has has been been successfully completed . The goal of the system is achieved and and prob proble lems ms are are so solv lved ed . The The pack packag age e is deve develo lope ped d in a manner that it is user friendly and required help is provided at different levels. The project can be easily used in the process of decision making.Different types of reports can be generated which help the departments work standards as well as the economical state of the department. This system never decreases the manpower but helps the development of available manpower and optimizes the manpower by which deparment’ nt’s standards and capabilities can be scaled to higher dimensions.
FUTURE ENHANCEMENTS Inmate tracking: Modern Modern prison prison design designs, s, partic particula ularly rly those those of highhighsecu securi rity ty priso prisons ns,, have have so soug ught ht to incr increa easi sing ngly ly rest restri rict ct and and contro controll the moveme movement nt of prison prisoners ers throug throughou houtt the facili facility ty while minimizing the corrections staffing needed to monitor and control the population. Inmate Inmates s will will wear wear "wrist "wristwa watch tch-siz -sized" ed" trans transmit mitter ters s that that can detect if prisoners have been trying to remove them and send an alert lert to pris prison on co com mputer uters s.S .Sta taff ff will ill also lso wear ear the the technology on their belts so they can be tracked for security purposes. Warders can activate an alarm themselves but the alert will also be sent if the transmitter is forcibly removed or the warder is knocked down. This system can pinpoint the location of staff and prisoners in real-time and track them within the confines of a prison. In an effo effort rt to mo moni nito torr larg large e grou groups ps and/ and/or or indi indivi vidu dual als s in corr co rrect ectio iona nall facIl facIlti ties, es, thei theirr surr surrou ound ndin ings gs,, or in set set open open enviro environme nments nts,ja ,jail il will will use the AMS-20 AMS-2000i 00i wirele wireless ss inmate inmate tracking system.
83
The The syst system em enab enable les s real real-t -tim ime e rest restri rict cted ed zo zone nes s administration and supports correctional facilities' operations by tigh tighte teni ning ng supe superv rvis ision ion of inma inmate tes s and and enha enhanc ncin ing g the the security of staff members. The system allows for the flexible implementation of various types of in-house and off premises work or rehabilitation programs and can interface with other facility security and communication systems, including alarms, CCTV cameras, door-locks and more, as needed. Included in the arrangement are tamper-proof, ankle or wrist worn RF (radio frequency) transmitters for inmates, offi officer cers s and and staf stafff, offi office cerr and and staf stafff page pagers rs,, a netw networ ork k of wireless monitoring units, and a user software interface. The information derived from the network of moni mo nito tori ring ng units nits allo allows ws faci facili lity ty ma mana nage geme ment nt to rece receiv ive e impe im pera rati tive ve loca locati tion on info inform rmat atio ion n on inma inmate tes s and and staf stafff, providing it with enhanced control over facility operations. The system enables the user to configure the facility inne innerr and and outer outer grou ground nds s to incl includ ude e rest restri ricte cted d area areas s and and moni mo nito torr them them ac acco cord rdin ing g to inma inmate te's 's sched schedul ules es.. The The new new system will be configured configured to monitor monitor a few hundred inmates, inmates, who who will will wear wear Elmo Elmo--Tech' ech's s tran transm smit itter ters, s, mo moni nito tored red by a wireless network of smart control units distributed throughout the facility.
Biometric in prisons: Guar Guards ds in Jail Jail ca can n tell tell whic which h inma inmate tes s shou should ld be released just by the look in their eyes. the jail can use a hightech system that scans people's retinas to determine their identity. Biometric technologies use body parts or behaviors, from voice prints to hand geometry, to identify individuals. In use for over a decade at top-security government institutions, biometrics are spilling rapidly into other markets, driven by falling prices and growing public acceptance. Thou Thousa sand nds s of loca locati tion ons, s, from from day day ca care re cent center ers s to heal health th club clubs s to sper sperm m bank banks, s, alre alread ady y mo moni nito torr peop people le's 's finger fingerpri prints nts,, retina retinas, s, or other other person personal al parts parts to make make sure sure they are who they claim to be.
84
This swelling industry is finding a natural market in Indi India' a's s boom boomin ing g jail jails s and and pris prison ons. s. The The numb number er of peop people le 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. Biometrics, more convenient to use and much harder to fool than systems based on identity cards or photos, seem tailor-made for a market that is based on controlling people's movements. "Fingerprints started out strictly as a criminal thing, then they moved into welfare, and now they're used in banks and all kinds of places," s,". "Technology used for law enforcement purposes has a way of suddenly becoming used for all kinds of things."
85
BIBLIOGRAPHY The following following books were were refferd refferd during the analysis analysis and execution phase of the project
SOFTWARE ENGINEERING By Roger.S. Pressman
CORE JSP By Damon Hougland
SQL FOR PROFESSIONALS By Jain
COMPLETE HTML Steven Holzner
UNIFIED MODELING LANGUAGE By Grady Booch,Ranbaugh,Jacobson
JAVA 2 COMPLETE REFERENCE By Patrick Naughton , Herbertschildt
WEB SITES VISITED www.w3shools.com www.academictutorials.com www.java.sun.com www.mysql.com www.javasoft.com www.coreservlets.com
86
87
VISIT REQUEST : import import import import import import import import
javax.servlet.*; java.io.*; javax.servlet.http.*; java.util.*; java.util.Calendar; java.text.*; java.sql.*; java.lang.*;
public class visitrequest1 extends HttpServlet { Connection conn=null Statement stmt=null ResultSet rs=null; ResultSet rs1=null; ResultSet rs2=null; ResultSet rs3=null; Public void doPost(HttpServletRequestreq,HttpServle tResponse res) throws IOException,ServletException { res.setContentType("text/html"); PrintWriter =res.getWriter(); Try { 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 java.util.Dat e dd=new java.util.Date(); java.util.Dat e(); 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("
"+s2+"
"+form.format(dt)+"
"+ft.parse(s2)+"< br>"+dt+"
"+(ft.parse(s2)).after(ft.parse(form.format(dt)))+"
" +dt.before(ft.parse(s2))+"
"+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 rs1=stmt.executeQ uery("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 rs2=stmt.executeQ uery("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("
"+ft.parse(s2)+"
"+ft.parse(form.format(dt))+"
"+(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.executeQuer rs3=stmt.executeQuery("select y("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"; status="reject"; rd=req.getRequestDispatcher("reject.htm"); rd.forward(req,res); stmt.executeUpdate("insert into visit_reg values('"+ses.getAttribute("vid")+"','"+ses.getAttribute("pid")+"','"+s2+"' ,'"+status+"')"); } if(p!=1) { String status="accept"; status="accept";
89
rd=req.getRequestDispatcher("accept.htm"); rd.forward(req,res); stmt.executeUpdate("insert into visit_reg values('"+ses.getAttribute("vid")+"','"+ses.getAttribute("pid")+"','"+s2+"' ,'"+status+"')"); 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:
prison <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; } } if')">
93
94