crime reporting
TRANSCRIPT
-
7/31/2019 Crime Reporting
1/124
A website on Crime Reporting 1
Website on CRIME REPORTING(Management regarding Crime)
RAJ NARAYAN MISHRA 1
-
7/31/2019 Crime Reporting
2/124
A website on Crime Reporting 2
Acknowledgement:
I feel pride and privileged in expressing my deep sense of gratitude to all those
who have helped me in presenting this assignment . I would be failing in my endeavor if I
do not place my acknowledgement.
I express my sincere gratitude to Mr. Rakesh kumar Upadhyay for his
inspiration and constructive suggestion and for his mastermind analysis and affectionate
guidance in my work, without it this project work completion was impossible for me.
My heartfelt gratitude also goes to VAG INFOTECH PVT.LTD Team for
providing me with the opportunity to avail the excellent facilities and infrastructure. The
knowledge and values inculcated have proved to be of immense help at the very start of
my career.
I would like to take the opportunity to thank all VAG Staff for constantlybearing with our complaints throughout the project . Sincere thanks to all my seniors and
colleagues at VAG INFOTECH PVT.LTD for their support and assistance throughout the
project.
RAJ NARAYAN MISHRA(M.Tech-IT)
(Roll no: 1011DMTE061)
RAJ NARAYAN MISHRA 2
-
7/31/2019 Crime Reporting
3/124
A website on Crime Reporting 3
Abstract of the project
Crime reporting is the first of the nine basic Youth Crime Watch components. Most simply,
it's giving the proper authorities information you have about.
A crime that might be committed
A crime that has been committed
Someone who was involved in committing a crime
Young people understand the importance of reporting crime. They want safer schools and
neighborhoods, and if they know how to report effectively, they'll do it. Young people can
help encourage peers to report crime in the making as well as information on crimes under
investigation.
Objective:
We have developed the portal of website on crime reporting
(management regarding crime), the portal can handle data of criminals who are under
the judicial surveillance or are under trial. This portal will be most useful for defense for
searching of details of the criminals, anyone can report a fir online, missing citizen search,
and secure registration and profile management facilities for detectives and security
agencies facilitate communication between all stakeholders - discussion forum/mail/polls.
The portal has few sections, which is discussed a below:
An Administrator is provided through which handles the site, Databases and allow
detectives, citizens & Defense Officials. A FIR form is provided through which
citizens can enter details of the crime reported. This data once entered can be
edited/deleted as required when there will be vast entries of data administrator can
scroll the data.
There are sections provided for Defense Officials, Detectives and citizens.
RAJ NARAYAN MISHRA 3
-
7/31/2019 Crime Reporting
4/124
A website on Crime Reporting 4
CITIZENS:
In Citizens sections, user can enter the details ofFIR (FIRST
INVESTIGATION REPORT) through the help of portal. The portal has forms that will
ask details of victim(s), crime id/name/location/address/city /country/contact
person/contact number/contact email_id. Once after entering the details the data will be
saved by clicking save button and the details will be stored in the FIR database. Each FIR
will be given a unique ID.
ADMINISTRATOR(S):
In ADMINISTRATOR(S) section, various data is available for
searching details of criminals, Firs, judicial results, case hearings and other. Administrator
can update databases for the required fields.
SEARCH:
In Search section, authorized detectives and Defense Officials will
search for matching records of criminals, FIR details, missing people etc.
ALERT SERVICE:
An alert is been send to citizen regarding the FIR ID and an alert is
been send to a concerned person of the area regarding the CRIME.
RAJ NARAYAN MISHRA 4
-
7/31/2019 Crime Reporting
5/124
A website on Crime Reporting 5
BENEFITS OF CRIME REPORTING:
In order to quantify the benefits of your crime reporting portal, you first
have to know what to look for. CRIME REPORTING can help you in different ways. Here
are some of the areas to look for benefits in implementing a portal:
1. Paper Reduction
CRIME REPORTINGcan reduce the cost associated with creating anddistributing paper requirements and resumes. Cost savings result from:
Direct savings from reduced paper, printing, and distribution costs.
Indirect savings from time spent handling paper documents.
2. Paperwork Transfer
A big expense with a manually maintaining records and requirement system
is that of transferring of records from one person to another. For example, the file
works is no not been done by hands but is done online. Reducing the communication
expenses.
3. Improved Data Quality
Manual records must be then entered into a computer in order to be
processed for further process or may be maintained into database for future
requirement. Whenever data is keyed into a computer from a hand-written document,
errors will be made. These errors can cost you in many direct and indirect ways.
RAJ NARAYAN MISHRA 5
-
7/31/2019 Crime Reporting
6/124
A website on Crime Reporting 6
Incorrect selection may take place. When wrong justification is done due to
manual errors and adjustment is costly for system.
without accurate information, you lose the ability to perform useful decisionsupport. You should have accurate information about the background of the case
as well as the crime, departments worked in, areas the organization is working
in etc. for your decision support.
4. Transparency
The work of judicial system is not transparent these days. This is an
initiative to make the progress transparent.
RAJ NARAYAN MISHRA 6
-
7/31/2019 Crime Reporting
7/124
A website on Crime Reporting 7
Functionalities of the project:
The system is implemented using a 3-tier approach, with a backend database
(MySQL database), a middle tier of Apache Tomcat, JSP, and Servlets and a front end web
browser (client).
Crime reporting forms, progress tracking, proof attachments.
on form submission an e mail goes to regional police officer in case if its
serious category crime where quick attention is required.
Facilitate crime and criminals search region, crime-type, gender, age group wise
etc.
Missing citizen or valuables reporting and search
Secure registration and profile management facilities for detectives and security
agencies.
Facilitate communication between all stakeholders - Discussion
forum/chat/mail/polls.
Help book & time-to-time instructions to users through mail
RAJ NARAYAN MISHRA 7
-
7/31/2019 Crime Reporting
8/124
-
7/31/2019 Crime Reporting
9/124
A website on Crime Reporting 9
1.2.4 Requirements Analysis Phase
Functional user requirements are formally defined and delineate the requirements in terms
of data, system performance, security, and maintainability requirements for the system. All
requirements are defined to a level of detail sufficient for systems design to proceed. All
requirements need to be measurable and testable and relate to the business need or
opportunity identified in the Initiation Phase.
1.2.5 Design Phase
The physical characteristics of the system are designed during this phase. The operating
environment is established, major subsystems and their inputs and outputs are defined, and
processes are allocated to resources. Everything requiring user input or approval must be
documented and reviewed by the user. The physical characteristics of the system are
specified and a detailed design is prepared. Subsystems identified during design are used to
create a detailed structure of the system. Each subsystem is partitioned into one or more
design units or modules. Detailed logic specifications are prepared for each software
module.
1.2.6 Development Phase
The detailed specifications produced during the design phase are translated into hardware,
communications, and executable software. Software shall be unit tested, integrated, and
retested in a systematic manner. Hardware is assembled and tested.
1.2.7 Integration and Test Phase
The various components of the system are integrated and systematically tested. The user
tests the system to ensure that the functional requirements, as defined in the functional
requirements document, are satisfied by the developed or modified system. Prior to
installing and operating the system in a production environment, the system must undergo
certification and accreditation activities.
RAJ NARAYAN MISHRA 9
-
7/31/2019 Crime Reporting
10/124
A website on Crime Reporting 10
1.2.8 Implementation Phase
The system or system modifications are installed and made operational in a production
environment. The phase is initiated after the system has been tested and accepted by the
user. This phase continues until the system is operating in production in accordance with
the defined user requirements.
1.2.9 Operations and Maintenance Phase
The system operation is ongoing. The system is monitored for continued performance in
accordance with user requirements, and needed system modifications are incorporated. The
operational system is periodically assessed through In-Process Reviews to determine how
the system can be made more efficient and effective. Operations continue as long as the
system can be effectively adapted to respond to an organizations needs. When
modifications or changes are identified as necessary, the system may reenter the planning
phase.
1.2.10 Disposition Phase
The disposition activities ensure the orderly termination of the system and preserve the
vital information about the system so that some or all of the information may be reactivatedin the future if necessary. Particular emphasis is given to proper preservation of the data
processed by the system, so that the data is effectively migrated to another system or
archived in accordance with applicable records management regulations and policies, for
potential future access.
RAJ NARAYAN MISHRA 10
-
7/31/2019 Crime Reporting
11/124
A website on Crime Reporting 11
RAJ NARAYAN MISHRA 11
Platform/Technology
used in the Project
-
7/31/2019 Crime Reporting
12/124
A website on Crime Reporting 12
Technologies used in software development are
Java: Java is a high level, third generation programming language, like C,
FORTRAN, Perl and others. It is a platform for distributed computing - a development andrun-time environment that contains built-in support for the World Wide Web.
Java Features are:-
Simplicity
Orientation
Platform Independence
Security
High Performance
Multi -Threading
Dynamic Linking
Garbage Collection
One of the most important features of Java is Platform Independence which
makes it famous and suitable language for World Wide Web.
RAJ NARAYAN MISHRA 12
-
7/31/2019 Crime Reporting
13/124
A website on Crime Reporting 13
Eclipse: Eclipse is a multi-language software development environment
comprising an integrated development environment (IDE) and an extensible plug-in
system. It is written primarily in Java and can be used to develop applications in Java and,
by means of the various plug-ins, in other languages as well, including C, C++, COBOL,
Python, Perl, PHP, and others. The IDE is often called Eclipse ADT for Ada, Eclipse CDT
for C, Eclipse JDT for Java and Eclipse PDT for PHP.
The initial codebase originated from Visual Age. In its default form it is meant for Java
developers, consisting of the Java Development Tools (JDT). Users can extend its
capabilities by installing plug-ins written for the Eclipse software framework, such as
development toolkits for other programming languages, and can write and contribute their
own plug-in modules.
Released under the terms of the Eclipse Public License, Eclipse is free and open source
software.
JavaBeans and JSP: Java Server Pages (JSP) is another java technology for
developing web application. JSP was released during the time servlet technology had
gained popularity as one of the best web technologies available. JSP is not meant to replace
servlets, however. In fact, JSP is an extension of the servlet technology, and it is common
practice to use both servlets and JSP pages in the same web applications . The JSP
Technology is based on JSP API that consists of two packages.
a. Javax.servlet.jsp
b. Javax.servlet.jsp.tagext
RAJ NARAYAN MISHRA 13
-
7/31/2019 Crime Reporting
14/124
-
7/31/2019 Crime Reporting
15/124
A website on Crime Reporting 15
JavaScript: JavaScript is used for client side validation. Client side validation
controls perform input checking in serve code. When the user submits a form to the server.
The validation controls are invoked to review the users input, control bye control. If an
error has occurred in any of the input controls, the page itself is set to an invalid state soone can test for validity error code runs.
HTML : HTML is a language that puts the face on the web by helping to prepare
documents for online publication. These documents are also called as web documents and
each HTML document is known as web pages. HTML is a standard language the all web
browser can understand and interpret. HTML is the way of representing test linking that
test to other kinds of resources including sound files graphics files, multimedia files etc. ,
that allows these kinds of data to be displayed o]together, to set them and reinforce one
another . As delivered by the web server, HTML is nothing more than a plain test file.
HTML instructions divide the test of a document into blocks called elements.
JDBC : JDBC is an API for the Java Programming language that defines how a
client may access a database. It provides methods for querying and updating data in a
database. JDBC is oriented towards relational databases. JDBC allows multiple
implementations to exist and be used by the same application.There are many
classifications of databases available as Hierarchical database, Network database,
Relational database, Object databases and soon. Due their flexibility Relational database
management systems are most successful bread of databases in the history of computing.
Ex: - Oracle, IBMdb2, and Microsoft SQL Server.
A technology that enables JSP base applications to interact directly with database
engines is called Java Database Connectivity and is an integral part of Java platform.
JDBC/JSP based web application access the database connections. These connections must
be managed carefully by the application especially if a large number of concurrent users
may be accessing them. To make this performance optimization JDBC uses a mechanism
called connection pooling.
RAJ NARAYAN MISHRA 15
-
7/31/2019 Crime Reporting
16/124
A website on Crime Reporting 16
Interaction of JSP Page with JDBC
Application Server Machine
Client Machine
Browser
with
HTML
DB Server Machine
Here the browser using the web application is not required to support java at
all. The JSP has full control over how many JDBC connections are made to the server. The
client never makes direct JDBC connection to the server. This solution can work readily
through a firewall, only standard HTTP is used between the web server and the client.
RAJ NARAYAN MISHRA 16
Web server
JSP
EngineJDBC
Driver
RDBMS
Server
-
7/31/2019 Crime Reporting
17/124
A website on Crime Reporting 17
Client Side Interface:
In client side interface we are using:-Servlets / JSP for Internet Based Application.
Servlets / JSP are middle-ware technologies which are used in web based projects because
they use:-
HTTP Protocol to handle Request and Response.
They are invoked through Browser.
They give output in HTML format.
They need Browser Support.
ABOUT J2EE
Introduction to J2EE:
The multi-tier architecture such as COBRA has got its own
advantages in terms of scalability, performance and reliability.
In a multi-tier architecture, a client does not interact directly
with the server. Instead, it first contacts another layer called Middleware. The middleware
instantiates the server applications and messages the server object. It returns results to the
clients. The presence of a middleware layer allows programmers to concentrate on business
logic of application. The middleware handles low-lever services, such as thread handling,
security, and transactions management.
Sun Microsystems introduced the J2EE application server and the
enterprise Java Bean (EJB) specifications as a venture into the multi-tier component
architecture. J2EE functions as a middle tier server in three tier architectures.
It provides certain specifications that can be used to implement
enterprise solutions for certain all types of business requirements. J2EE also offers cost
effective solution for business solution.
RAJ NARAYAN MISHRA 17
-
7/31/2019 Crime Reporting
18/124
A website on Crime Reporting 18
J2EE is used for developing, deploying and executing applications
in a distributed environment. The J2EE applications server acts as a platform for
implementing various server side technologies Servlets, Java Server Pages (JSP) andEnterprise Java Bean (EJB). J2EE allows you to focus on your business logic program. The
business logic is coded in java program, which are reusable component that can be
accessed client program EJB runs on J2EE server.
In J2EE security is handled almost entirely by platform and its admin. The developer
does not have to worry about writing the security logic.
J2EE Architecture:
The J2EE SDK architecture consists of the following components:
The J2EE server
The EJB Container
The Web Container
RAJ NARAYAN MISHRA 18
-
7/31/2019 Crime Reporting
19/124
A website on Crime Reporting 19
Process of creating a J2EE application
Assembled
Deployed
RAJ NARAYAN MISHRA 19
Enterprise Bean(.jar file)
Component(.jar file)
J2EE Application Server(.jar file)
J2EEServer
-
7/31/2019 Crime Reporting
20/124
A website on Crime Reporting 20
RAJ NARAYAN MISHRA 20
MODULES OF THE
PROJECT
-
7/31/2019 Crime Reporting
21/124
A website on Crime Reporting 21
MODULES IN CRIME REPORTING :
FIR Form
In Citizens sections, user can enter the details of FIR (FIRST
INVESTIGATION REPORT) through the help of portal. The portal has forms
that will ask details of victim(s), crime id/name/location/address/city
/country/contact person/contact number/contact email_id. Once after entering the
details the data will be saved by clicking save button and the details will be stored
in the FIR database. Each FIR will be given a unique ID.
Password Module
In this module, user enters a password and the portal checks its validity. If
the password is valid then he is allowed to update the database, otherwise Invalid
User/Password message is displayed.
Search
In Search section, authorized detectives and Defense Officials will search
for matching records of criminals, FIR details, missing people etc.
Contact of Concerned Authority
Contact details of the area official who is solving the case
Queries
Detailed information of the crime can be entered and retrieved by
administrators.
RAJ NARAYAN MISHRA 21
-
7/31/2019 Crime Reporting
22/124
A website on Crime Reporting 22
Validation of Case & Officer Entered to ASSIGN CASE to an Officer
In this module, the validity of data entered by the user during the
various processes is checked through various validation checks. For example, there
shouldnt be any characters entered in the numeric fields, likewise if there is any
error occurs that it should handle that particular error and give the required
messages.
.
RAJ NARAYAN MISHRA 22
-
7/31/2019 Crime Reporting
23/124
A website on Crime Reporting 23
Future Scope of the Website:
Police departments produce more paperwork than any other agency.
Police departments and other law enforcement agencies around the world
generate more paperwork than any other commercial or government mechanism. You
collect details of crime scenes, witness statements, reports, supplemental reports,
evidence catalog cards, chains of custody and other miscellaneous forms. All this
paperwork is required so that all aspects of a criminal investigation are documented and
preserved appropriately. Keeping track of this ever-growing pile of paper is a task that,
by itself, generates additional paperwork. Using a paperless digital storage mechanism
reduces costs, improves environmental issues and increases data security while it
facilitates access to key personnel.
Cost and Resource Consumption Reduction
Large archives can be replaced with smaller processing centers.
Computer-based report management systems, though costly in the beginning, prove to
be cost effective. They also reduce the need for large traditional archive facilities. In
2010, an investment of about $200,000 will save a department millions in the 10 years
to follow as the need for buildings, archival material and personnel decrease.
Improved Security and Access
Digital encryption secures data better than traditional physical security does.
The implementation of a computer-managed records management system will also
triple security. Paper documents can be stored in safes and behind locked doors, but
burglars always find a way in.
RAJ NARAYAN MISHRA 23
-
7/31/2019 Crime Reporting
24/124
-
7/31/2019 Crime Reporting
25/124
A website on Crime Reporting 25
RAJ NARAYAN MISHRA 25
E-R DIAGRAM
-
7/31/2019 Crime Reporting
26/124
A website on Crime Reporting 26
Entity-Relationship Diagram:
An Entity Relationship Diagram (ERD) gives a graphical representation of
the tables (entities) in the database and the relation between them.
Entity
An aggregation of a number of data elements.
Each data element is an attribute of the entity
Entity type
a class of entities with the same attributes
Relationship
An association between two or more entities that is of particular interest.
ERD Development Process:
Identify the entities
Determine the attributes for each entity
Select the primary key for each entity
Establish the relationships between the entities
Draw an entity model
Test the relationships and the keys
RAJ NARAYAN MISHRA 26
-
7/31/2019 Crime Reporting
27/124
A website on Crime Reporting 27
ER diagram of current system is as follows:
Figure 1: Entity Relationship Diagram
RAJ NARAYAN MISHRA 27
-
7/31/2019 Crime Reporting
28/124
A website on Crime Reporting 28
RAJ NARAYAN MISHRA 28
DATA FLOW DIAGRAM
-
7/31/2019 Crime Reporting
29/124
A website on Crime Reporting 29
Data flow diagrams (DFDs):
The Data Flow Diagram (DFD) is the graphical representation of the processes
and the flow of data among them. A data flow diagram illustrates the processes, data
stores, external entities and the connecting data flows in a system. The following
figure is an example of a typical DFD.
Figure: 2: Example of a Data Flow diagram
There are four components for a Data Flow Diagram. They are
External Entities/ Terminators are outside of the system being modeled.
They represent where information comes from and where it goes. These
are represented by rectangles.
Processes, usually represented by an ellipse (circle), which modify the
Input to generate the output.
Data Stores represents a place in the process where data rests. This is
represented by an open-ended rectangles or a cylinder symbol.
Data Flows, represented by arrows, are how data moves between
terminators, processes, and data stores.
RAJ NARAYAN MISHRA 29
-
7/31/2019 Crime Reporting
30/124
A website on Crime Reporting 30
Zero Level DFD:
Figure 3: Zero level DFD
RAJ NARAYAN MISHRA 30
-
7/31/2019 Crime Reporting
31/124
A website on Crime Reporting 31
DFD to search an officer record and to update this record:
Description: In this user have to put officer id to search the record if it found then
user can update the record of that officer.
DFD to search criminal record:
Description: In this user have to put criminal name into search box if record found
in the database then display the criminal record.
RAJ NARAYAN MISHRA 31
-
7/31/2019 Crime Reporting
32/124
A website on Crime Reporting 32
Number of Forms And Tables
FORMS:
The various forms included in the current project are as follows-
1. Welcome Form
2. FIR (First Investigation Report) Form
3. Send Information to Officer by mail
4. Contact us
5. Add Criminal information Form
6. Search Criminal record Form
7. Add Officer Information Form
8. Update Officer Record Form
9. Search Officer Detail Form
10. Check existence of case and officer record
11. Assign Case
RAJ NARAYAN MISHRA 32
-
7/31/2019 Crime Reporting
33/124
-
7/31/2019 Crime Reporting
34/124
A website on Crime Reporting 34
2. Criminal details:
This table is used to add criminal details into the database.
3. Officer details:
This table is used to add officer details into the database.
RAJ NARAYAN MISHRA 34
-
7/31/2019 Crime Reporting
35/124
A website on Crime Reporting 35
4. Assign Case:
This table is used assign case to the officer and to store the details of
assigned case.
RAJ NARAYAN MISHRA 35
-
7/31/2019 Crime Reporting
36/124
A website on Crime Reporting 36
Requirement Analysis:
User Characteristics
User must be a frequent user of computer system.
User must have experience of using online softwares
To make best use of this project user must be a Company Employees.
Constraints
Performance Constraints
Slow speed of processor or insufficient RAM will degrade the performanceof Crime project.
Design Constraints
Some of dialog boxes are not resizable and not necessarily have minimized
and maximize options. All the buttons are not of same sizes.
Hardware Requirements
Processor : Pentium-IV
RAM : 512 MB
O/S : Windows-XP
Hard Disk : 20 GB
RAJ NARAYAN MISHRA 36
-
7/31/2019 Crime Reporting
37/124
A website on Crime Reporting 37
Software Requirements
Operating System: Microsoft Windows XP.
IDE : Eclipse
Database Server: My SQL.
Server Side Language: JSP and Java Beans.
Client Side Language / Front End : HTML, Java Script
Communication between Client & Server: Java Networking Classes, Jsp.
External Jar Files
This project is using external jar files which are as follows
mysql-connector-java-5.0.4-bin
activation
dns
imap
mail
mailapi
pop3
smtp
RAJ NARAYAN MISHRA 37
-
7/31/2019 Crime Reporting
38/124
A website on Crime Reporting 38
RAJ NARAYAN MISHRA 38
System Testing
-
7/31/2019 Crime Reporting
39/124
A website on Crime Reporting 39
SYSTEM TESTING
Here the System testing involved is the most widely used testing process consisting
of five stages as shown in the figure. In general, the sequence of testing activities is
component testing, integration testing, and then user testing. However, as defects are
discovered at any one stage, they require program modifications to correct them and this
may require other stages in the testing process to be repeated.
(Component testing) (Integration testing) (User testing)
RAJ NARAYAN MISHRA 39
Unit testing
Moduletesting
Acceptancetesting
Sub-systemtesting
Systemtesting
-
7/31/2019 Crime Reporting
40/124
A website on Crime Reporting 40
Testing is the process of detecting errors. Testing performs a very critical role for
quality assurance and for ensuring the reliability of the software. The results of testing are
used later on during maintenance also.
Testing is vital to the success of the system. System testing makes a logical assumption that
if the parts of the system are correct, the goal will be successfully achieved. In adequate
testing or non-testing leads to errors that may not appear until months or even years later
(Remember the New York three day power failure due to a misplaced Break statement).
This creates two problems:
1. The time lag between the cause and the appearance of the problem.
2. The time interval effect of the system errors on files and the records on the
system.
A small error can conceivably explode into a much larger problem. Effective testing early
in the process translates directly into long term cost savings from a reduced number of
errors.
Another reason for system testing is its utility as a user oriented vehicle before
implementation. The best program is worthless if it does not meet the user requirements.
Unfortunately, the users demands are often compromised by efforts to facilitate program
or design efficiency in terms of processing time or design efficiency.
Thus in this phase we went to test the code we wrote. We needed to know if the code
compiled with the design or not? Whether the code gave the desired outputs on given
inputs? Whether it was ready to be installed on the users computer or some more
modifications were needed?
RAJ NARAYAN MISHRA 40
-
7/31/2019 Crime Reporting
41/124
A website on Crime Reporting 41
Through the web applications are characteristically different from there software
counterparts but the basic approach for testing these web applications is quite similar.
These basic steps of testing have been picked from software engineering practices. The
following are the steps, we undertook:
1. The content of the Intranet site is reviewed to uncover Content Errors. Content
Errors covers the typographical errors, grammatical errors, errors in content
consistency, graphical representation and cross referencing errors
2. The design model of the web application is reviewed to uncover the navigation
errors. Use cases, derived as a part of the analysis activity allows a web designer to
exercise each usage scenario against the architectural and navigational design. In
essence these non-executable tests help to uncover the errors in navigation.
3. When web applications are considered the concept of unit changes. Each web page
encapsulate content navigation links, content and processing elements(Forms,
Scripts, JSPs as in our case). It is not always possible to test each of these
individually. Thus is the base of the web applications the unit to be considered is
the web page. Unlike the testing of the algorithmic details of a module the data that
flows across the module interface, page level testing for web applications is driven
by content, processing and links encapsulating the web page.
4. The Assembled web application is tested for overall functionality and content
delivery. the various user cases are used that test the system for errors and mistakes.
5. The Web application is tested for a variety of environmental settings and is tested
for various configurations and upon various platforms.
The modules are integrated and integration test are conducted.
RAJ NARAYAN MISHRA 41
-
7/31/2019 Crime Reporting
42/124
A website on Crime Reporting 42
6. Thread based testing is done to monitor the regression tests so that the site does not
become very slow is a lot of users are simultaneously logged on.
7. A controlled and monitored population of end users tests Intranet application , this
all comprises of the User Acceptance Testing .
Because web application evolve continuously , the testing process is an ongoing
activity, conducted by web support staff in our case the Organizations IS people who
will finally update and manage the application.
PSYCHOLOGY OF TESTING
The aim of testing is often to demonstrate that a program works by showing that it
has no errors. The basic purpose of testing phase is to detect the errors that may be present
in the program. Hence one should not start testing with the intent of showing that a
program works, but the intent should be to show that a program doesnt work. Testing is the
process of executing a program with the intent of finding errors.
RAJ NARAYAN MISHRA 42
-
7/31/2019 Crime Reporting
43/124
A website on Crime Reporting 43
TESTING OBJECTIVES:
The main objective of testing is to uncover a host of errors, systematically and withminimum effort and time. Stating formally, we can say,
Testing is a process of executing a program with the intent of finding an error.
A successful test is one that uncovers an as yet undiscovered error.
A good test case is one that has a high probability of finding error, if it exists.
The tests are inadequate to detect possibly present errors.
The software more or less confirms to the quality and reliable standards.
RAJ NARAYAN MISHRA 43
-
7/31/2019 Crime Reporting
44/124
A website on Crime Reporting 44
LEVELS OF TESTING
In order to uncover the errors present in different phases, we have the concept oflevels of testing. The basic levels of testing are
Client Needs
Acceptance Testing
Requirements
System Testing
Design
Integration Testing
Code
Unit Testing
RAJ NARAYAN MISHRA 44
-
7/31/2019 Crime Reporting
45/124
A website on Crime Reporting 45
Unit testing
Unit testing focuses verification effort on the smallest unit of software i.e.the module. Using the detailed design and the process specifications, testing is done to
uncover errors within the boundary of the module. All modules must be successful in the
unit test before the start of the integration testing begins.
In this project each service can be thought of a module. There are so many modules
like Login, HR Department, Interviewer Section, etc. Each module has been tested by
giving different sets of inputs. When developing the module as well as finishing the
development, the module works without any error. The inputs are validated when accepting
them from the user.
Integration Testing
After unit testing, we have to perform integration testing. The goal here is to
see if modules can be integrated properly, the emphasis being on testing interfaces between
modules. This testing activity can be considered as testing the design and hence the
emphasis on testing module interactions.
In this project the main system is formed by integrating all the modules. When
integrating all the modules I have checked whether the integration effects working of any
of the services by giving different combinations of inputs with which the two services run
perfectly before Integration.
System Testing
Here the entire software system is tested. The reference document for this
process is the requirements document, and the goal is to see if software meets its
requirements.
RAJ NARAYAN MISHRA 45
-
7/31/2019 Crime Reporting
46/124
A website on Crime Reporting 46
A cceptance Testing
Acceptance Testing is performed with realistic data of the client to demonstrate that
the software is working satisfactorily. Testing here is focused on external behavior of the
system; the internal logic of program is not emphasized.
Test cases should be selected so that the largest number of attributes of an
equivalence class is exercised at once. The testing phase is an important part of software
development. It is the process of finding errors and missing operations and also a complete
verification to determine whether the objectives are met and the user requirements are
satisfied.
WHITE BOX TESTING
This is a unit testing method, where a unit will be taken at a time and tested
thoroughly at a statement level to find the maximum possible errors.
I tested step wise every piece of code, taking care that every statement in the code
is executed at least once. The white box testing is also called Glass Box Testing.
I have generated a list of test cases, sample data, which is used to check all possible
combinations of execution paths through the code at every module level.
White-box test focuses on the program control structure. Test cases are derived to
ensure that all statement in the program control structure. Test cases are derived to ensure
that all statement in the program control structure. Test cases are derived to ensure that all
statement in the program has been executed at least once during testing and that all logical
conditions have been exercised. Basis path testing, a white box technique, makes use of
program graphs (or graph matrices) to derive the set of linearly independent test that will
ensure coverage. Condition and data flow testing further exercising degrees of complexity.
RAJ NARAYAN MISHRA 46
-
7/31/2019 Crime Reporting
47/124
A website on Crime Reporting 47
BLACK BOX TESTING
This testing method considers a module as a single unit and checks the unit at
interface and communication with other modules rather getting into details at statement
level. Here the module will be treated as a block that will take some input and generate
output. Output for a given set of input combinations are forwarded to other modules.
Black-box test are designed to uncover errors functional requirement without regard
to the internal workings of a program. Black-box testing techniques focus on the
information domain of the software, deriving test cases by partitioning the input and output
domain of a program in manner that provides through test coverage. The black-box test is
used to demonstrate that software functions are operational, that input is properly produced,
and that the integrity of external information are maintained. A black-box test examines
some fundamental aspect of a system with little or no regard for the integral logical
structure of the software.
Graph based testing methods explore the relationship between and behavior of
program objects. Equivalence partitioning divides the input classes of data are likely to
exercise specific software function. Boundary values analysis probes the programs ability
to handle data at the limits of acceptability.
TEST INFORMATION FLOW
A strategy for software testing may also be viewed in the context of the spiral. Unit
testing begins at the vortex of the spiral and, concentrates on each unit, component of
the software as implemented in source code. Testing progresses moving outward along
the spiral to integration testing, where the focus is on designed the construction of the
software architecture. Taking another turn outward on spiral, we encounter validation
testing,
Where requirements established as part of software requirements analysis are validated
against the software that has been constructed. Finally, we arrive at system testing, where
RAJ NARAYAN MISHRA 47
-
7/31/2019 Crime Reporting
48/124
A website on Crime Reporting 48
the software and other system elements are tested as a whole. To test computer software,
we spiral out along stream lines that broaden the scope of testing with each turn.
Considering the process from a procedural point of view, testing within the context of
software engineering is actually a series of four steps that are implemented sequentially.
The steps are shown in Figure. Initially, tests focus on each component individually,
ensuring that it functions properly as unit. Hence, the name unit testing. Unit testing makes
heavy use of white-box testing techniques, exercising specific paths in modules control
structure to ensure complete coverage and maximum error detection.
System Security
INFORMATION FLOW OF DATA FOR TESTING
RAJ NARAYAN MISHRA 48
System Testing
System Engineering
Validation Testing
Integration Testing
Desi n
Validation testing
-
7/31/2019 Crime Reporting
49/124
A website on Crime Reporting 49
RAJ NARAYAN MISHRA 49
Evaluatio
n
Testing
Reliability
Model
Debug
SoftwareConfiguration
Test Results
ErrorRate Data
Test Configuration
Expected Results
Predicated Reliability
Error
-
7/31/2019 Crime Reporting
50/124
A website on Crime Reporting 50
RAJ NARAYAN MISHRA 50
Source Code
-
7/31/2019 Crime Reporting
51/124
A website on Crime Reporting 1
VIEW LAYER
RAJ NARAYAN MISHRA 1
-
7/31/2019 Crime Reporting
52/124
A website on Crime Reporting 2
Index.jsp
Insert title hereFormat for filing a complaint with theNHRC
HomeFIRcontact usCriminalRecordOfficerRecordAssign Case
(1) COMPLAINT'SDETAILSnameContactAgesex
male
RAJ NARAYAN MISHRA 2
-
7/31/2019 Crime Reporting
53/124
A website on Crime Reporting 3
female
full AddressDistrictStateCountry(2) INCIDENT DETAILSIncedent place(village/city/town)state
-
7/31/2019 Crime Reporting
54/124
A website on Crime Reporting 4
selectobc
scstgeneral
click here after fill all the information
Login.jsp
Insert title hereCrime Branch,India
HomeFIRContact UsCriminalRecordOfficerRecordAssign Case
news updateswrwr jfglkh lkjhl mkrfkn kgkfl ,mlgfmh.fmlmglfhlmlg lmhlg knkly kljy oykpoRAJ NARAYAN MISHRA 4
-
7/31/2019 Crime Reporting
55/124
A website on Crime Reporting 5
fkjk jfhgj;
lmlkg kkfk kjhkf knkf knkf kngkfn knf fnkoyktpu yumj kno nunyuj gknkjukj
jeor rrjtjro rtirnirti ritrin jf itjrit tjirytu ytu tyjou kyjtuk kyjt djtorn jtoy yjtto tyjtjy ytl tytl kou kjoui ujyu yujyu yujyu yyujy kjuyum
HomeFIRInvestigationCriminalRecordOfficerRecordAssign Case
SENDFIR.jsp
Insert title here
Fill each field and click on SendMail to send the informationRAJ NARAYAN MISHRA 5
-
7/31/2019 Crime Reporting
56/124
A website on Crime Reporting 6
Send Mail
To :
Subject :
Message : complaint details
name:
contact:age:sex:address:district:country:
Incident Placeplace:state:district:
date:
Victims Detailsname:no of victims:age:sex:address:pin code:district:state:
religion:caste:
RAJ NARAYAN MISHRA 6
-
7/31/2019 Crime Reporting
57/124
A website on Crime Reporting 7
SENDMAIL.jsp
Insert title here
-
7/31/2019 Crime Reporting
58/124
A website on Crime Reporting 8
bn.getI_dist();bn.getI_date();bn.getV_name();bn.getNo_of_victims();bn.getV_age();
bn.getV_sex();bn.getV_address();bn.getV_pincode();bn.getV_dist();bn.getV_state();bn.getV_religion();bn.getV_caste();%>
Acnot.jsp
Insert title here
RAJ NARAYAN MISHRA 8
-
7/31/2019 Crime Reporting
59/124
A website on Crime Reporting 9
Oops! The criminal ID Or Officer ID does not existTo Go previousclick here
Assigncase.jspInsert title here
Before Assign Case enter Full details
RAJ NARAYAN MISHRA 9
-
7/31/2019 Crime Reporting
60/124
A website on Crime Reporting 10
Case Details
Crime Id
Officer Id
Checkavailability.jsp
Insert title hereBefore Assign Case to Officer please check theevidenceHomeFIRcontact us
CriminalRecordOfficerRecordAssign Case
RAJ NARAYAN MISHRA 10
-
7/31/2019 Crime Reporting
61/124
A website on Crime Reporting 11
Criminal IDOfficer ID
Contact.jspInsert title here
HomeFIRcontact usCriminalRecordOfficerRecordAssign Case
Name:Shivakant
ContactNo:9650344178
Add:Yamuna ViharRAJ NARAYAN MISHRA 11
-
7/31/2019 Crime Reporting
62/124
A website on Crime Reporting 12
Delhi-53
E Mail:[email protected]Index.jsp
Insert title hereFormat for filing a complaint with theNHRC HomeFIR
contact usCriminalRecordOfficerRecordAssign Case
(1) COMPLAINT'SDETAILSnameContactAge
RAJ NARAYAN MISHRA 12
-
7/31/2019 Crime Reporting
63/124
A website on Crime Reporting 13
sex
male
female
full AddressDistrictStateCountry(2) INCIDENT DETAILSIncedent place(village/city/town)state
-
7/31/2019 Crime Reporting
64/124
A website on Crime Reporting 14
districtstatereligion
casteselect
obcscstgeneral
click here after fill all the information
S1.jsp
Insert title hereTo update the Criminal record Click here--Update CriminalINformation
To insert new records of a Criminal Click here--Add newrecordSCinsBean.jsp
-
7/31/2019 Crime Reporting
65/124
A website on Crime Reporting 15
"http://www.w3.org/TR/html4/loose.dtd">Insert title here
SCinsert.jspInsert title here
Add Details aboutCriminals
RAJ NARAYAN MISHRA 15
-
7/31/2019 Crime Reporting
66/124
A website on Crime Reporting 16
Criminal NameAge
Crime_typeselectmurderrobberykiddnapkiller
Gender
FemaleMale
Search.jsp
RAJ NARAYAN MISHRA 16
-
7/31/2019 Crime Reporting
67/124
A website on Crime Reporting 17
Insert title here
Welcome to Search page HomeFIRcontact usCriminalRecordOfficerRecord
Assign Case
Typethe name below to find record :
To insert new records of a Criminal Click here--Add newrecordSearchoff.jsp
RAJ NARAYAN MISHRA 17
-
7/31/2019 Crime Reporting
68/124
A website on Crime Reporting 18
Insert title hereWelcome to Search Officer's pageHomeFIRcontact usCriminalRecordOfficerRecordAssign Case
Type the name
below to find record :
To update the Officers record Click here--UpdateOfficers InformationTo insert new records of a Officers Click here--Add newrecord
RAJ NARAYAN MISHRA 18
-
7/31/2019 Crime Reporting
69/124
A website on Crime Reporting 19
Showcrecord.jsp
Insert title hereCriminal Details
=0){//Iterator itr=ld.iterator();try {Iterator itr=al.iterator();while(itr.hasNext()){%>
infodata
Crime IDCriminal NameAge
RAJ NARAYAN MISHRA 19
-
7/31/2019 Crime Reporting
70/124
A website on Crime Reporting 20
Case TypeSex
To Search Again click hereshowOrecord
Insert title hereOfficer Details
-
7/31/2019 Crime Reporting
71/124
-
7/31/2019 Crime Reporting
72/124
A website on Crime Reporting 22
pageEncoding="ISO-8859-1"%>
Insert title here
Officer's DetailsAdd Officers Details here:
officer Name
location
RAJ NARAYAN MISHRA 22
-
7/31/2019 Crime Reporting
73/124
A website on Crime Reporting 23
Soupdate.jspInsert title hereUpdate Officer Database
input ID of the officer to update"
Soupdate2.jspInsert title here
Update Officer Database
-
7/31/2019 Crime Reporting
74/124
A website on Crime Reporting 24
ArrayList al=(ArrayList)hs1.getAttribute("result");
if(al.size()>=0){//Iterator itr=ld.iterator();
try {
Iterator itr=al.iterator();while(itr.hasNext()){%>
Officer IdOfficer Name
location
RAJ NARAYAN MISHRA 24
-
7/31/2019 Crime Reporting
75/124
A website on Crime Reporting 25
CONTROLLER AND DAO LAYER
RAJ NARAYAN MISHRA 25
-
7/31/2019 Crime Reporting
76/124
A website on Crime Reporting 26
Mail.java
package jmail;import javax.mail.*;import javax.mail.internet.*;import java.util.*;public class mail {
String to;String from;String message;String subject;
String smtpServ;public String getTo() {return to;
}public void setTo(String to) {
this.to = to;}public String getFrom() {
return from;}public void setFrom(String from) {
this.from = from;}public String getMessage() {
return message;}public void setMessage(String message) {
this.message = message;}public String getSubject() {
return subject;}public void setSubject(String subject) {
this.subject = subject;}public String getSmtpServ() {
return smtpServ;
}public void setSmtpServ(String smtpServ) {
this.smtpServ = smtpServ;}
public int sendMail(){try{
Properties props = System.getProperties();
RAJ NARAYAN MISHRA 26
-
7/31/2019 Crime Reporting
77/124
A website on Crime Reporting 27
// -- Attaching to default Session, or we could start a new one --props.put("mail.transport.protocol", "smtp" );props.put("mail.smtp.starttls.enable","true" );
props.put("mail.smtp.host",smtpServ);props.put("mail.smtp.auth", "true" );Authenticator auth = new SMTPAuthenticator();Session session = Session.getInstance(props, auth);// -- Create a new message --Message msg = new MimeMessage(session);// -- Set the FROM and TO fields --msg.setFrom(new InternetAddress(from));msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(to, false));msg.setSubject(subject);msg.setText(message);// -- Set some other header information --msg.setHeader("MyMail", "Mr. XYZ" );msg.setSentDate(new Date());// -- Send the message --Transport.send(msg);System.out.println("Message sent to"+to+" OK." );return 0;
}catch (Exception ex){ex.printStackTrace();System.out.println("Exception "+ex);return -1;
}}
private class SMTPAuthenticator extends javax.mail.Authenticator {@Overridepublic PasswordAuthentication getPasswordAuthentication() {
String username ="[email protected]"; // specify your email id here(sender's email id)
String password = "crimeproject763";// specify your password here
return new PasswordAuthentication(username, password);}
}
}
RAJ NARAYAN MISHRA 27
-
7/31/2019 Crime Reporting
78/124
A website on Crime Reporting 28
Assign.javapackage serv;
import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;
public class assign {Connection con;Statement smt;ResultSet rs;int crimeID,offID;String Case_details;public assign() {
try {Class.forName("com.mysql.jdbc.Driver");
} catch (Exception e) {e.printStackTrace();// TODO: handle exception
}try {
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/crime","root","shiva");
smt=con.createStatement();
} catch (Exception e) {System.out.println("exception occured"+e);// TODO: handle exception
}}public void insert(String s,String s1,String ab){
try {int i=Integer.parseInt(s1);int i2=Integer.parseInt(s);//System.out.println(b);//System.out.println(c);//int b1=Integer.parseInt(b);//int c1=Integer.parseInt(c);
PreparedStatementps=con.prepareStatement("insert intoassigncase(Case_details,crimeID,offID) value(?,?,?); ");
RAJ NARAYAN MISHRA 28
-
7/31/2019 Crime Reporting
79/124
A website on Crime Reporting 29
// ps.setInt(1,);ps.setString(1,ab);ps.setInt(2,i);ps.setInt(3,i2);ps.executeUpdate();
} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();
}
}
}
Assignbean.javapackage serv;
public class assignBean {int crimeId,offId;String caseDetail;public int getCrimeId() {
return crimeId;}public void setCrimeId(String crimeid) {
if(crimeid!=null){int Id=Integer.parseInt(crimeid);crimeId=Id;
}
}public int getOffId() {
return offId;}public void setOffId(String offid) {
if(offid!=null){int id=Integer.parseInt(offid);offId=id;
}}public String getCaseDetails() {
return caseDetail;}public void setCaseDetails(String caseDetails) {
this.caseDetail = caseDetails;}
}
RAJ NARAYAN MISHRA 29
-
7/31/2019 Crime Reporting
80/124
-
7/31/2019 Crime Reporting
81/124
A website on Crime Reporting 31
}public int getC_contact() {
return c_contact;}public void setC_contact(int cContact) {
c_contact = cContact;
}public int getC_age() {
return c_age;}public void setC_age(int cAge) {
c_age = cAge;}public String getI_place() {
return i_place;}public void setI_place(String iPlace) {
i_place = iPlace;}public String getI_state() {
return i_state;}public void setI_state(String iState) {
i_state = iState;}public String getI_dist() {
return i_dist;}public void setI_dist(String iDist) {
i_dist = iDist;}public int getI_date() {
return i_date;
}public void setI_date(int iDate) {
i_date = iDate;}public String getV_name() {
return v_name;}public void setV_name(String vName) {
v_name = vName;}public String getV_sex() {
return v_sex;}public void setV_sex(String vSex) {
v_sex = vSex;}public String getV_address() {
return v_address;}public void setV_address(String vAddress) {
v_address = vAddress;}public String getV_dist() {
RAJ NARAYAN MISHRA 31
-
7/31/2019 Crime Reporting
82/124
A website on Crime Reporting 32
return v_dist;}public void setV_dist(String vDist) {
v_dist = vDist;}public String getV_state() {
return v_state;}public void setV_state(String vState) {
v_state = vState;}public String getV_religion() {
return v_religion;}public void setV_religion(String vReligion) {
v_religion = vReligion;}public String getV_caste() {
return v_caste;}public void setV_caste(String vCaste) {
v_caste = vCaste;}public int getV_age() {
return v_age;}public void setV_age(int vAge) {
v_age = vAge;}public int getV_pincode() {
return v_pincode;}public void setV_pincode(int vPincode) {
v_pincode = vPincode;}
}
Indexconnect.jsppackage serv;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.Statement;
public class indexConnect {String c_name,c_dist,c_state,c_address,c_country,c_sex;int c_contact,c_age;String i_place,i_state,i_dist;int i_date;String v_name,v_sex,v_address,v_dist,v_state,v_religion,v_caste;int v_age,v_pincode,no_of_victims;
RAJ NARAYAN MISHRA 32
-
7/31/2019 Crime Reporting
83/124
A website on Crime Reporting 33
Connection con;Statement smt;ResultSet rs;public indexConnect() {
try {
Class.forName("com.mysql.jdbc.Driver");} catch (ClassNotFoundException e) {
// TODO Auto-generated catch blocke.printStackTrace();
}try {
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/crime","root","shiva");
smt=con.createStatement();} catch (Exception e) {
// TODO Auto-generated catch blockSystem.out.println("exception occured"+e);
}}
public void insert(beanI b){
try {PreparedStatement ps=con.prepareStatement("insert
intocrimes(c_name,c_contact,c_age,c_sex,c_addr,c_dist,c_state,c_country,i_place,i_state,i_dist,i_date,v_name,v_no,v_age,v_sex,v_addr,v_pin,v_dist,v_state,v_religion,v_caste)values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);");
ps.setString(1, b.getC_name());ps.setInt(2, b.getC_contact());ps.setInt(3,b.getC_age());
ps.setString(4,b.getC_sex());ps.setString(5, b.getC_address());ps.setString(6, b.getC_dist());ps.setString(7,b.getC_state());ps.setString(8, b.getC_country());ps.setString(9,b.getI_place());ps.setString(10,b.getI_state());ps.setString(11,b.getI_dist());ps.setInt(12,b.getI_date());ps.setString(13,b.getV_name());ps.setInt(14,b.getNo_of_victims());ps.setInt(15,b.getV_age());ps.setString(16,b.getV_sex());ps.setString(17,b.getV_address());ps.setInt(18,b.getV_pincode());ps.setString(19,b.getV_dist());ps.setString(20,b.getV_state());ps.setString(21,b.getV_religion());ps.setString(22,b.getV_caste());ps.executeUpdate();System.out.println("java j2ee");return;
} catch (Exception e) {
RAJ NARAYAN MISHRA 33
-
7/31/2019 Crime Reporting
84/124
A website on Crime Reporting 34
// TODO Auto-generated catch blockSystem.out.println("exception occured on dao"+e);
}}
}
Indserv.jsppackage serv;
import java.io.IOException;import java.io.PrintWriter;import java.sql.ResultSet;
import java.sql.SQLException;import java.util.ArrayList;import java.util.Iterator;import java.util.Random;import javax.servlet.RequestDispatcher;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import javax.servlet.http.HttpSession;import javax.validation.Validation;import javax.validation.Validator;import javax.validation.ValidatorFactory;
import serv.beanI;
/*** Servlet implementation class indserv*/public class indserv extends HttpServlet {
private static final long serialVersionUID = 1L;
/*** @see HttpServlet#HttpServlet()*/public indserv() {
super();
// TODO Auto-generated constructor stub}
/*** @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)*/
RAJ NARAYAN MISHRA 34
-
7/31/2019 Crime Reporting
85/124
A website on Crime Reporting 35
protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stubPrintWriter out=response.getWriter();String offs=request.getParameter("offids");HttpSession hs1=request.getSession();
hs1.setAttribute("offids",offs);out.println("hello servlet");
if(request.getParameter("my").equals("SendMailBean")){
indexConnect ic=new indexConnect();HttpSession hs=request.getSession(false);
beanI bn= (beanI) hs.getAttribute("up");
System.out.println("java j2ee");System.out.println(bn.getC_name());ic.insert(bn);response.sendRedirect("http://localhost:8081/Crime_report");
}
if(request.getParameter("my").equals("s1")){String k=request.getParameter("CriminalName");
out.println("out put"+k);}
if(request.getParameter("my").equals("SCinsert1")){
HttpSession hs=request.getSession(false);SCinsBean b=(SCinsBean) hs.getAttribute("e");
SearchCrime sc=new SearchCrime();
try {sc.insert(b);
response.sendRedirect("http://localhost:8081/Crime_report/search.jsp");} catch (SQLException e) {
// TODO Auto-generated catch blockSystem.out.println("H?ELLO");e.printStackTrace();
}//int s=b.getInvestigator_id();//System.out.println(s);
System.out.println(b.getCname());//System.out.println(b.getCage());//System.out.println(b.getCtype());//System.out.println(b.getDesc());//System.out.println(b.getSex());
//System.out.println(b.getInvestigator_id());}
if(request.getParameter("my").equals("search"))
RAJ NARAYAN MISHRA 35
-
7/31/2019 Crime Reporting
86/124
A website on Crime Reporting 36
{String s1=request.getParameter("CriminalName");SearchCrime sc=new SearchCrime();
ArrayList al=sc.search(s1);
HttpSession hs=request.getSession();hs.setAttribute("result",al);//System.out.println(s1);RequestDispatcher rd=request.getRequestDispatcher("ShowCRecord.jsp");rd.forward(request,response);}
if(request.getParameter("my").equals("SOinsert1")){
HttpSession hs=request.getSession(false);SearchOff off=new SearchOff();SOinsBean sob=(SOinsBean) hs.getAttribute("so");try {
off.insert(sob);
response.sendRedirect("http://localhost:8081/Crime_report/searchOff.jsp");
} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();
}System.out.println(sob.getOffName());
}
if(request.getParameter("my").equals("searchOff")){
String s1=request.getParameter("OffName");SearchOff sc=new SearchOff();
ArrayList al=sc.search(s1);
HttpSession hs=request.getSession();hs.setAttribute("result",al);System.out.println(s1);RequestDispatcher rd=request.getRequestDispatcher("ShowORecord.jsp");rd.forward(request,response);}
if(request.getParameter("my").equals("cav")){
String s1=request.getParameter("crimeId");String s2=request.getParameter("offId");SearchCrime sc=new SearchCrime();SearchOff so=new SearchOff();HttpSession hs=request.getSession(false);System.out.println(s1);System.out.println(s2);int s11=sc.check(s1);
RAJ NARAYAN MISHRA 36
-
7/31/2019 Crime Reporting
87/124
A website on Crime Reporting 37
int s12=so.check(s2);if(s11!=0 && s12!=0){
System.out.print(" found");RequestDispatcher
rd=request.getRequestDispatcher("assigncase.jsp");rd.forward(request,response);
}else{
System.out.print("not found");RequestDispatcher
rd=request.getRequestDispatcher("acnot.jsp");rd.forward(request,response);
}}
if(request.getParameter("my").equals("searchid")){
SearchOff sc=new SearchOff();System.out.println(offs);ArrayList al=sc.show(offs);
HttpSession hs=request.getSession();hs.setAttribute("result",al);System.out.println(offs);Iterator itr=al.iterator();while(itr.hasNext()){
out.println(itr.next());}RequestDispatcher rd=request.getRequestDispatcher("SOupdate2.jsp");
rd.forward(request,response);
}if(request.getParameter("my").equals("updateoff")){
SearchOff sc=new SearchOff();HttpSession hsm=request.getSession(false);int offid= (Integer) hsm.getAttribute("id");String Name=(String)hsm.getAttribute("Name");SOinsBean bs=new SOinsBean();//int id1=Integer.parseInt(s1);String s2=request.getParameter("location");bs.setLoc(s2);System.out.println(bs.getLoc());System.out.println(offid+Name);sc.update(offid,bs);response.sendRedirect("");
}if(request.getParameter("my").equals("assign")){
HttpSession hs=request.getSession(false);//assignBean ab=(assignBean) hs.getAttribute("a");String s=(String) hs.getAttribute("m");String s1=(String) hs.getAttribute("y");
RAJ NARAYAN MISHRA 37
-
7/31/2019 Crime Reporting
88/124
A website on Crime Reporting 38
assign as=new assign();
String s2=request.getParameter("caseDetail");System.out.println(s+s1+s2);//ab.setCaseDetails(s1);//String s2=request.getParameter("crimeId");
//String s3=request.getParameter("offid");as.insert(s,s1,s2);
response.sendRedirect("http://localhost:8081/Crime_report/checkAvailability.jsp");
//System.out.println("hello assign block"+ab.getCrimeId()+ab.getCaseDetails());
}
if(request.getParameter("my").equals("assign")){//Object ob=new Random().nextInt(9999-1000)+1000;String s1=request.getParameter("caseDetail");HttpSession hsa=request.getSession(false);String s2=(String)hsa.getAttribute("m");String s3=(String)hsa.getAttribute("y");System.out.println(s1+s2+s3);
assignBean ab1=new assignBean();ab1.setCaseDetails(s1);ab1.setCrimeId(s2);ab1.setOffId(s3);String s5=ab1.getCaseDetails();out.println(ab1.getCrimeId());//int s5=ab.getCrimeId();//int s4=ab.getOffId();//System.out.println(s2+s3+s4);
HttpSession hs=request.getSession(false);assignBean ab=(assignBean) hs.getAttribute("a");//int s8=ab.getCrimeId();//out.println(ab.getOffId());assign as=new assign();
//String s2=request.getParameter("crimeId");//String s3=request.getParameter("offid");//as.insert(ab1);
//System.out.println("hello assign block"+ab.getCrimeId()+ab.getCaseDetails());
}
}
}
RAJ NARAYAN MISHRA 38
-
7/31/2019 Crime Reporting
89/124
A website on Crime Reporting 39
SCinsBean.java
package serv;
import org.hibernate.validation.constraints.NotEmpty;
public class SCinsBean {@NotEmptyString Cname;
String Ctype,sex;
int Cage;
public String getCname() {return Cname;
}
public void setCname(String cname) {this.Cname = cname;
}public String getCtype() {
return Ctype;}public void setCtype(String ctype) {
Ctype = ctype;}
public String getSex() {return sex;
}
public void setSex(String sex) {this.sex = sex;
}public int getCage() {
return Cage;}public void setCage(String cage) {
if(cage!=null){int x=Integer.parseInt(cage);Cage = x;}
}
}
Searchcrime.jsp
package serv;
RAJ NARAYAN MISHRA 39
-
7/31/2019 Crime Reporting
90/124
A website on Crime Reporting 40
import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;
import java.sql.Statement;import java.util.ArrayList;
public class SearchCrime {Connection con;Statement smt;ResultSet rs;String CName,Crime_type;int CAge;public SearchCrime(){
try {Class.forName("com.mysql.jdbc.Driver");
} catch (Exception e) {e.printStackTrace();// TODO: handle exception
}try {
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/crime","root","shiva");
smt=con.createStatement();
} catch (Exception e) {System.out.println("exception occured"+e);// TODO: handle exception
}
}public ResultSet show(){
try {String s="select * from Criminal_Details";rs=smt.executeQuery(s);
} catch (Exception e){
e.printStackTrace();}
return rs;}
public int insert(SCinsBean sb) throws SQLException {System.out.println("SEX====="+sb.getSex());PreparedStatement ps=con.prepareStatement("insert into
Criminal_Details(CName,CAge,Crime_type,sex) value(?,?,?,?)");ps.setString(1,sb.getCname());ps.setInt(2,sb.getCage());
RAJ NARAYAN MISHRA 40
-
7/31/2019 Crime Reporting
91/124
-
7/31/2019 Crime Reporting
92/124
A website on Crime Reporting 42
}
Searchoff.java
package serv;
import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.util.ArrayList;
import sun.security.action.GetLongAction;
public class SearchOff {Connection con;
Statement smt;ResultSet rs;PreparedStatement ps;
String off_name,location;
public SearchOff() {// TODO Auto-generated constructor stubtry {
Class.forName("com.mysql.jdbc.Driver");
} catch (Exception e) {e.printStackTrace();
// TODO: handle exception}try {
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/crime","root","shiva");
smt=con.createStatement();
} catch (Exception e) {System.out.println("exception occured in officers"+e);// TODO: handle exception
}}
public void update(int id1,SOinsBean bs){System.out.println(id1);String loc=bs.getLoc();System.out.println(loc);String locate="'"+loc+"'";
//String S1="Update officer set location='"+loc+"' whereoff_id="+id1+"";
try {//PreparedStatement ps=con.prepareStatement("S1");
RAJ NARAYAN MISHRA 42
-
7/31/2019 Crime Reporting
93/124
A website on Crime Reporting 43
// ps.setString(1, loc);
smt.executeUpdate("Update officer setlocation="+locate+"where off_id="+id1);
return;} catch (SQLException e) {
// TODO Auto-generated catch blockSystem.out.println(e.getMessage());
}try{
rs=ps.executeQuery();int x=rs.getConcurrency();if(x==ResultSet.CONCUR_UPDATABLE){
System.out.println("UPDATABLE");}else
System.out.println("NOT UPDATABLE");
//ps=con.prepareStatement("UPDATE login SET )//rs2.m
rs.relative(4);rs.updateString(4,bs.getLoc());
rs.updateRow();}catch(Exception e){
System.out.println(e.getMessage());}
}
public ArrayList show(String s){
int ss=Integer.parseInt(s);ArrayList al=new ArrayList();String s1="select * from officer where off_id="+ss+"";
try {rs=smt.executeQuery(s1);System.out.println(ss);while(rs.next()){
al.add(rs.getInt(1));al.add(rs.getString(2));
}
} catch (Exception e){
e.printStackTrace();}
return al;}
RAJ NARAYAN MISHRA 43
-
7/31/2019 Crime Reporting
94/124
A website on Crime Reporting 44
public int check(String c1){
int ID = 0;if(c1!=null){int c=Integer.parseInt(c1);String S="select * from officer where off_id="+c+"";
try {rs=smt.executeQuery(S);while(rs.next()){
ID=rs.getInt(1);}
} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();System.out.print("exception in check method");
}
}return ID;
}public void insert(SOinsBean sb) throws SQLException {ps=con.prepareStatement("insert into officer(off_name,location)
value(?,?)");ps.setString(1,sb.getOffName());ps.setString(2, sb.getLoc());ps.executeUpdate();}public ArrayList search(String s){
ArrayList al=new ArrayList();
String s1="select * from officer where off_name='"+s+"'";
try {rs=smt.executeQuery(s1);while(rs.next()){al.add(rs.getInt(1));al.add(rs.getString(2));al.add(rs.getString(3));}
} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();System.out.println("exception in search officers
class");}
return al;}
}
RAJ NARAYAN MISHRA 44
-
7/31/2019 Crime Reporting
95/124
A website on Crime Reporting 45
SOinsBean.jsppackage serv;
public class SOinsBean {int OffId;String OffName,loc;public int getOffId() {
return OffId;}public void setOffId(String offId) {if(offId!= null){
int id=Integer.parseInt(offId);OffId = id;
}}
public String getOffName() {return OffName;}public void setOffName(String offName) {
OffName = offName;}public String getLoc() {
return loc;}public void setLoc(String loc) {
this.loc = loc;}
}
RAJ NARAYAN MISHRA 45
-
7/31/2019 Crime Reporting
96/124
A website on Crime Reporting 46
RAJ NARAYAN MISHRA 46
-
7/31/2019 Crime Reporting
97/124
A website on Crime Reporting 47
RAJ NARAYAN MISHRA 47
-
7/31/2019 Crime Reporting
98/124
A website on Crime Reporting 48
RAJ NARAYAN MISHRA
Screen Shot
48
-
7/31/2019 Crime Reporting
99/124
-
7/31/2019 Crime Reporting
100/124
A website on Crime Reporting 50
Send details to the senior faculty
Criminal Record
RAJ NARAYAN MISHRA 50
-
7/31/2019 Crime Reporting
101/124
A website on Crime Reporting 51
Officer Record
Add Officer Record
RAJ NARAYAN MISHRA 51
-
7/31/2019 Crime Reporting
102/124
A website on Crime Reporting 52
Update Officer Record
Update Officer Record
RAJ NARAYAN MISHRA 52
-
7/31/2019 Crime Reporting
103/124
A website on Crime Reporting 53
Check the availability of the criminal and the officer
Assign case with full details
RAJ NARAYAN MISHRA 53
-
7/31/2019 Crime Reporting
104/124
A website on Crime Reporting 54
RAJ NARAYAN MISHRA
System Security
54
-
7/31/2019 Crime Reporting
105/124
A website on Crime Reporting 55
SYSTEM SECURITY
Introduction
One might think that there is a little reason to be concerned about security in anintranet. After all, by definition an intranet is internal to ones organization; outsider can
not access it. There are strong arguments for the position that an intranet should be
completely open to its users, with little or no security. One might not have considered ones
intranet on any other light.
On the other hand, implementing some simple, built-in security measures in ones intranet
can allow one to provide resources one might not have considered possible in such context.
For example, one can give access to some Web Pages to some people without them
available to oner entire customer base, with several kinds of authentication.
Intranet security is, then, a multifaceted issue, with both opportunities and dangers,
especially if ones network is part of the Intranet.
There are basically two types of security associated with this system:
1. Physical security:-
Damage due to natural causes like earth tremor, flooding, water logging, fire hazards,
atmospheric or environmental conditions etc..For overcoming these difficulties the
replica of the data are automatically stored at various networks and for environmental
conditions Air conditioning environment is created.
RAJ NARAYAN MISHRA 55
-
7/31/2019 Crime Reporting
106/124
A website on Crime Reporting 56
2. Data security:-
There are basically two problems associated with data security:-a). Data not being available to the authorized person at the time of need.
b). Data becoming available to the unauthorized person.
To overcome these difficulties the following access facilities has been provided:-
i) Identification:-
Unique Ids for the different users have been provided.
ii) Authentication:-
System checks the password under the particular user identification. The computer
permits the various resource to the authorized person.
iii) Authorisation:-
The access control mechanism to prevent unauthorized logging to the system.
Need for Security
Many people view computer and network security in a negative light,
thinking of it only in terms of restricting access to services. One major view of network
security is that which is not expressly permitted is denied. Although this is a good way of
thinking about how to connect other organization to the internet, one can, and possibly
should, view intranet security from a more positive angle. Property set up, intranet security
can be an enabler, enriching ones intranet with services and resources one would not
otherwise be able to provide. Such an overall security policy might be described as that
which is not expressly denied is permitted.
RAJ NARAYAN MISHRA 56
-
7/31/2019 Crime Reporting
107/124
A website on Crime Reporting 57
This does not mean that one should throw caution to the wind and make everything
available to ones users on ones intranet. There are many things to consider when placing
sensitive business data out on ones intranet. It may fall into the wrong hands, or worse, be
used against ones business. For example, some of ones users might have information theywould li9ke to make available, provided access to it can be limited to a specified group-for
example, confidential management or financial information. Without the ability to ensure
that only those who have the right to see such information will have access, the custodians
of data will not be willing to put it on ones intranet. Providing security increases ones
organizations ability to use the important collaborative aspects of an intranet.
The more defensive approach, preventing abuse of ones intranet, is also given play,
however. Organizations needs for security in an intranet can vary widely. Businesses in
which confidentiality and discretion are the norm in handling proprietary information and
corporate intellectual property have different needs than a college or university, for
example. Academic institutions generally tilt toward making the free exchange of ideas a
primary interest. At the same time, though the curiosity (to use a polite word) of
undergraduates requires strong needs for security. Keeping prying sophomores out of
university administration computing resources is a high priority; for example, students have
been known to try to access grade records(their own or those of others) for various reasons.
Security Features of an Intranet:-
Before going into a great deal of detail about how one can use security to enhance ones
intranet, take a high- level look at what security features are available to ones. These break
down into three main categories.
RAJ NARAYAN MISHRA 57
-
7/31/2019 Crime Reporting
108/124
A website on Crime Reporting 58
First, one can take steps on ones Web server to set up security. Second, one can take
steps with the other TCP/IP network services one has set up on ones intranet to enhance
their security. Third, one can secure customers Web browsers themselves to limit what
they can do with them.
a) Web server Security
There is a wide range of very flexible security features one can implement on ones Web
server. Heres a summary:
Access to Web servers, individual Web pages, and entire directories containing Web
pages can be set to require a username and password.
Access to Web servers, individual Web pages, and entire directories containing Web
pages can be limited to customers on specific computer systems. (In other words,
access will be denied unless the user is at his or her usual computer or workstation.)
One can organize individuals into groups and grant access to individual Web
servers, Web pages, and entire directories containing Web pages based on group
membership.
One can organize computers into groups, and grant access to individual Web
servers, Web pages, and entire directories containing Web pages based on group
membership.
Its ones responsibility to determine the level of security one need on ones
intranet, and, of course, to implement it. Putting most of the security measures mentioned
into place is not difficult. Ones primary concern will be explaining to customers how
intranet security works, not so much as a limiting factor but as an opportunity for increaseduse and collaboration using ones intranet. Assuring decision-makers that they can make
information available on ones intranet in a secure fashion can go a long way toward
making ones intranet a success.
At the same time, its important to make sure both information providers and their
RAJ NARAYAN MISHRA 58
-
7/31/2019 Crime Reporting
109/124
A website on Crime Reporting 59
customers understand a number of critical aspects of intranet security, so they dont
inadvertently defeat the purpose of it.
There are network security commonplaces, unrelated to intranet security specifically, thatneed ones attention. All the security precautions in the world cant protect ones intranet
from overall poor security practices. Users making poor choices on passwords always lead
the list of computer and network security risks. One can limit access to a sensitive Web
resources based on the TCP/IP network address of bosss pc, but if the boss walks away
and leaves his pc unattended without an active screen lock, anyone who walks into the
empty office can access the protected resources.
b) An Important Warning About Hostname/ IP Address Authentication
All of the Web server software described in this chapter trustingly accepts the word
of a requesting computer when it sends its IP address. Verification of this information is not
possible. Its relatively easy for a user to change the hostname/IP address of a UNIX
system, and laughably easy to change that of a pc or Mac. A curious, mischievous, or
malicious person can reconfigure his computer to impersonate someone elses simply by
changing the IP address of his own. Although this is an overall network security issue, not
specifically one for ones intranet, its important one Know about it because it can affect
the security of ones access controlled documents. Security-minded network administrators
can use special hardware and software to prevent this sort of IP spoofing, but for ones
intranet, onell probably want to combine hostname/IP address authentication with
username/password authentication, as outlined in the following section.
RAJ NARAYAN MISHRA 59
-
7/31/2019 Crime Reporting
110/124
A website on Crime Reporting 60
c) Secure/ Encrypted Transactions
One can further enhanced security on ones intranet by encrypting Web transactions. Whenone use an encryption facility, information submitted by customers using Web fill-in forms-
including usernames, passwords, and other confidential information-can be transmitted
securely to and from the Web server.
d) Intranet and the Internet
Is ones intranet is accessible from the internet? If so, all of the security problems of the
Internet are now ones intranets problems, too. One can, however, connect safely to the
Internet and still protect ones intranet. One can even use the Internet as a means of letting
remotes sites in ones company access ones intranet.
e) Firewalls
Its a fact of Internet life there are people out there who want to break into other peoples
networks via the Internet. Reasons vary from innocent curiosity to malicious cracking to
business and international espionage. At the same time, the value of Internet to
organizations and businesses is as great that vendors are rushing to fill the need for Internet
security with Internet firewalls. An Internet firewall is a device that sits between ones
internal network and outside Internet. Its purpose is to limit access into and out of ones
network based on ones organizations access policy.
A firewall can be anything from a set of filtering rules set up on the router between
one and the Internet to an elaborate application gateway consisting of one or more specially
configured computers that control access. Firewalls permit desired services coming from
the outside, such as Internet e-mail, to pass. In addition, most firewalls now allow access to
the World Wide Web from inside the protected networks.
RAJ NARAYAN MISHRA 60
-
7/31/2019 Crime Reporting
111/124
A website on Crime Reporting 61
The idea is to allow some services to pass but to deny others. For example, one
might be able to use the Telnet utility to log into systems on the Internet, but users on
remote systems cannot use to log into ones local system because of the firewall.
Summary
Security is important not so much because it prevents things, but because it enables them.
Judicious use of built-in security features of the Web server and other intranet resources can
add value to ones intranet by making new things possible.
RAJ NARAYAN MISHRA 61
-
7/31/2019 Crime Reporting
112/124
A website on Crime Reporting 62
IMPLEMENTATION
Introduction
System implementation is the stage when the user has thoroughly tested the system
and approves all the features provided by the system. The various tests are performed and
the system is approved only after all the requirements are met and the user is satisfied.
The new system may be totally new, replacing an existing manual or
automated system, or it may be a major modification to an existing system. In either case,
proper implementation is essential to provide a reliable system to meet organizational
requirements. Successful implementation may not guarantee improvement in the
organization using the new system (that is a design question), but improper will prevent it.
Implementation is the process of having systems personnel check out and
put new equipment into use, train users, install the new application and construct any files
of data needed to use it. This phase is less creative than system design. Depending on the
size of the organization that will be involved in using the application and the risk involved
in its use, systems developers may choose to test the operation in only one area of the firm
with only one or two persons. Sometimes, they will run both old and new system in parallelway to com-pare the results. In still other situations, system developers stop using the old
system one day and start using the new one the next.
The implementation of the web based or lan based networked project has some extra
steps at the time of implementation. We need to configure the system according the
requirement of the software.
For the project we need to install and configure Weblogic server 8.1 , database server,
and the deployment directory for the project.
RAJ NARAYAN MISHRA 62
-
7/31/2019 Crime Reporting
113/124
A website on Crime Reporting 63
Aspects of Implementation
The two aspects of implementation are:
Training Personnel
Conversion Procedures
TRAINING
Even well designe