Crime Reporting

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 124

A website on Crime Reporting 1

Website on CRIME REPORTING


(Management regarding Crime)

RAJ NARAYAN MISHRA

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 constantly bearing 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

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. scroll the data. There are sections provided for Defense Officials, Detectives and citizens. This data once entered can be edited/deleted as required when there will be vast entries of data administrator can

RAJ NARAYAN MISHRA

A website on Crime Reporting 4 CITIZENS: 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. 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

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 REPORTING can reduce the cost associated with creating and

distributing 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

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 decision support. 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

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 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 if its

forum/chat/mail/polls. Help book & time-to-time instructions to users through mail

RAJ NARAYAN MISHRA

A website on Crime Reporting 8

System Development Methodology


System Development Life Cycle
PHASES: 1.2.1 Initiation Phase The initiation of a system (or project) begins when a business need or opportunity is identified. A Project Manager should be appointed to manage the project. This business need is documented in a Concept Proposal. After the Concept Proposal is approved, the System Concept Development Phase begins. 1.2.2 System Concept Development Phase Once a business need is approved, the approaches for accomplishing the concept are reviewed for feasibility and appropriateness. The Systems Boundary Document identifies the scope of the system and requires Senior Official approval and funding before beginning the Planning Phase. 1.2.3 Planning Phase

The concept is further developed to describe how the business will operate once the approved system is implemented, and to assess how the system will impact the administrator and user privacy. To ensure the products and /or services provide the required capability on-time and within budget, project resources, activities, schedules, tools, and reviews are defined. Additionally, security certification and accreditation activities begin with the identification of system security requirements and the completion of a high level vulnerability assessment.

RAJ NARAYAN MISHRA

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

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 reactivated in 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

A website on Crime Reporting 11

Platform/Technology used in the Project

RAJ NARAYAN MISHRA

11

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 and run-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

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

A website on Crime Reporting 14 One of the most useful features of Java Server Pages is that JSP directly supports the use of JavaBeans through the <jsp:useBean> tag. Java Beans, as you probably know, are Java classes that can be leaded by name and otherwise conform to a specific set of rules. A big advantage of using JavaBeans in JSP applications is that they allow you to implement the logic of the JSP page as a separate Java class and plug it in This approach offers these significant advantages. 1. Separation of content from logic 2. Reusable plug in components for common tasks When they are used with Java Server Pages, Java Beans have two primary functions. They can be used as logic blocks, where their primary purpose is to separate logic form display, and as storage classes, where their primary purpose is data storage.

Servlets: Servlets are used to develop a variety of web-based application. They make

use of the extensive power of the Java API such as networking and URL access, multithreading, database connectivity, internationalization, RMI and object serialization. Java Server Pages (JSP) adds server side programming functionality to Java. Both Servlet and JSP allow the creation of database driven web application and have server side programming capability. XML: J2EE uses Extensible Markup Language as a Markup language to describe the contents. The described file created when deploying the J2EE application is an XML file.

RAJ NARAYAN MISHRA

14

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 so one 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

A website on Crime Reporting 16

Interaction of JSP Page with JDBC Application Server Machine Client Machine Browser with HTML JSP JDBC Web server

Engine

Driver

DB Server Machine

RDBMS Server

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

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

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) and Enterprise 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

A website on Crime Reporting 19

Process of creating a J2EE application

Enterprise Bean (.jar file)

Component (.jar file)

Assembled

J2EE Application Server (.jar file)

Deployed

J2EE Server

RAJ NARAYAN MISHRA

19

A website on Crime Reporting 20

MODULES OF THE PROJECT

RAJ NARAYAN MISHRA

20

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

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

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

A website on Crime Reporting 24

When the data is digital, stored behind traditional physical security systems and scrambled in a 32-bit encryption code, the possibility of stealing the data is 1 to 100 million. Also, through encrypted digital direct and even radio-based networks, officers in the field can access much-needed reports where they could not in the past. Less Support Personnel Required

One man with a laptop can do the work of five people. When a digital records management system is in place, you will no longer need a large work force to manage records, maintain facilities, maintain records on the records and maintain security. What was once performed by 20 or more people can now be reduced to fewer than 12. As many departments have done, a significant share of the remainder can be on contract basis, which will further reduce costs. ..

RAJ NARAYAN MISHRA

24

A website on Crime Reporting 25

E-R DIAGRAM

RAJ NARAYAN MISHRA

25

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

A website on Crime Reporting 27

ER diagram of current system is as follows:

Figure 1: Entity Relationship Diagram

RAJ NARAYAN MISHRA

27

A website on Crime Reporting 28

DATA FLOW DIAGRAM

RAJ NARAYAN MISHRA

28

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

A website on Crime Reporting 30

Zero Level DFD:

Figure 3: Zero level DFD

RAJ NARAYAN MISHRA

30

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

A website on Crime Reporting 32

Number of Forms And Tables


FORMS:
The various forms included in the current project are as follows1. 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

A website on Crime Reporting 33

DATABASE DESIGN
DATA STRUCTURES:
This part of the Design consists the overall database schema or we can say that tables which consists various types of records. Table of aa database consists attributes, entities, tuples for storing and manipulating records.

Some of the tables are as follows:

1. FIR:
This table is used to add the FIR details into the database.

RAJ NARAYAN MISHRA

33

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

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

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 performance of 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

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

A website on Crime Reporting 38

System Testing

RAJ NARAYAN MISHRA

38

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.

Unit testing

Module testing Sub-system testing System testing

Acceptance testing

(Component testing)

(Integration testing)

(User testing) 39

RAJ NARAYAN MISHRA

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. 2. The time lag between the cause and the appearance of the problem. 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

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 consistency, graphical representation and cross referencing errors

Errors. Content

Errors covers the typographical errors, grammatical errors, errors in content

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

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

A website on Crime Reporting 43

TESTING OBJECTIVES: The main objective of testing is to uncover a host of errors, systematically and with minimum 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

A website on Crime Reporting 44

LEVELS OF TESTING In order to uncover the errors present in different phases, we have the concept of levels 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

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

A website on Crime Reporting 46 Acceptance 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

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

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 Testing Validation Testing

Integration Testing

Validation testing Code

Design System Engineering

System Security

INFORMATION FLOW OF DATA FOR TESTING RAJ NARAYAN MISHRA

48

A website on Crime Reporting 49

Software Configuration

Evaluatio n
Test Results

Error Error Rate Data

Testing

Expected Results Debug

Reliability Model
Test Configuration

Predicated Reliability Correction

RAJ NARAYAN MISHRA

49

A website on Crime Reporting 50

Source Code

RAJ NARAYAN MISHRA

50

A website on Crime Reporting 1

VIEW LAYER

RAJ NARAYAN MISHRA

A website on Crime Reporting 2

Index.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.util.*" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#999999" > <marquee><h1 style="color:#CC33FF">Format for filing a complaint with the NHRC</h1></marquee> <table> <table align="center"> <tr><td colspan="5"><img alt="abc" src="img/Picture1.jpg"/> </td></tr> <tr bgcolor="#CCFF00"><th></th><th align="right"><a href="login.jsp">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.jsp">FIR</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contact.jsp">contact us</a>&nbsp;&nbsp;</th> <th align="left">&nbsp;&nbsp;<a href="search.jsp">CriminalRecord</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="searchOff.jsp">OfficerRecord</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="checkAvailability.jsp">Assign Case</a></th> <th></th></tr> </table> <br><br> <form action="SendFir.jsp" method="post"> <input type="hidden" name="my" value="index"></input> <table align="left"> <tr><td rowspan="25" align="left"><img alt="indian-police-logovert.jpg"src="img/indian-police-logo-vert.jpg"></img><td><u><b>(1) COMPLAINT'S DETAILS</b></u></td></tr> <tr><td>name</td><td><input name="c_name" type="text" ></td> <td>&nbsp;&nbsp;&nbsp;</td><td>Contact</td><td><input name="c_contact" type="text" ></td></tr> <tr><td>Age</td><td><input name="c_age" type="text" ></td> <td>&nbsp;&nbsp;&nbsp;</td> <td>sex</td> <td> <label> <input type="radio" name="c_sex" value="male"> male</label> <label> RAJ NARAYAN MISHRA 2

A website on Crime Reporting 3 <input type="radio" name="c_sex" value="female"> female</label> </td> </tr> <tr><td>full Address</td><td><input name="c_address" type="text"></td> <td>&nbsp;&nbsp;&nbsp;</td> <td>District</td><td><input name="c_dist" type="text" ></td> </tr> <tr><td>State</td><td><input name="c_state" type="text" ></td><td>&nbsp;&nbsp;&nbsp;</td> <td>Country</td><td><input name="c_country" type="text" ></td></tr> <tr></tr><tr></tr> <tr><td><u><b>(2) INCIDENT DETAILS</b></u></td></tr><tr></tr> <tr><td>Incedent place(village/city/town)</td><td><input name="i_place" type="text" ></td> <td>&nbsp;&nbsp;&nbsp;</td><td>state</td><td><input name="i_state" type="text""></td></tr> <tr><td>District</td><td><input name="i_dist" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td> <td>date of incident</td><td><input name="i_date" type="text" ></td></tr> <tr></tr><tr></tr> <tr><td><u><b>(3) VICTIM'S DETAILS</b></u></td></tr> <tr><td>name of victim</td><td><input name="v_name" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td> <td>no. of victims</td><td><input name="no_of_victims" type="text"></td></tr> <tr><td>age</td><td><input name="v_age" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td><td>sex</td><td> <label> <input type="radio" name="v_sex" value="m"> male</label> <label> <input type="radio" name="v_sex" value="f"> female</label> </td></tr> <tr><td>full address</td><td><input name="v_address" type="text" ></td><td>&nbsp;&nbsp;&nbsp;</td> <td>pin code</td><td><input name="v_pincode" type="text"></td></tr> <tr><td>district</td><td><input name="v_dist" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td> <td>state</td><td><input name="v_state" type="text"></td></tr> <tr><td>religion</td><td><input name="v_religion" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td> <td>caste</td><td><select name="v_caste"> RAJ NARAYAN MISHRA

A website on Crime Reporting 4 <option>select</option> <option>obc</option> <option>sc</option> <option>st</option> <option>general</option> </select></td></tr> <tr></tr><tr></tr> <tr><td>click here after fill all the information</td><td><input name="submit" type="submit" value="submit"></td></tr> </table> </form> </body> </html> Login.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#000033" text="#336600" > <marquee><h1 style="color:yellow;">Crime Branch,India</h1></marquee> <table> <tr><td colspan="5"><img alt="abc" src="img/Picture1.jpg"/> </td></tr> <tr bgcolor="#CCFF00"><th></th><th align="right"><a href="login.jsp">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.jsp">FIR</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contact.jsp">Contact Us</a>&nbsp;&nbsp;</th> <th align="left">&nbsp;&nbsp;<a href="search.jsp">CriminalRecord</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="searchOff.jsp">OfficerRecord</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="checkAvailability.jsp">Assign Case</a></th> <th></th></tr> </table> <br><center> <h2 style="color:Green;"><u>news updates</u></h2> <marquee style="color:red;" direction="up" width="80%" behavior="scroll" bgcolor="#CCFF66" loop="-1"> <table> <tr><th>wrwr jfglkh lkjhl mkrfkn kgkfl ,mlgfmh.fmlmglfhlmlg lmhlg knkly kljy oykpo RAJ NARAYAN MISHRA 4

A website on Crime Reporting 5 fkjk jfhgj;<br><br></br></th></tr> <tr><th>lmlkg kkfk kjhkf knkf knkf kngkfn knf fnkoyktpu yumj kno nunyuj gknkjukj <br/><br/></th></tr> <tr><th>jeor rrjtjro rtirnirti ritrin jf itjrit tjirytu ytu tyjou kyjtuk kyjt </th></tr> <tr><th>djtorn jtoy yjtto tyjtjy ytl tytl kou kjoui ujyu yujyu yujyu yyujy kjuyum </th></tr> </table> </marquee><br></br> <table width="100%" align="center"><tr bgcolor="#ff1524"><th></th><th align="right"><a href="login.jsp">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.jsp">FIR</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="">Investigation</a>&nbsp;&nbsp;</th> <th align="left">&nbsp;&nbsp;<a href="search.jsp">CriminalRecord</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="searchOff.jsp">OfficerRecord</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="checkAvailability.jsp">Assign Case</a></th> <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th></tr></table> </center> </body> </html> SENDFIR.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" session="true"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#443311"> <jsp:useBean id="up" class="serv.beanI" scope="session"/> <jsp:setProperty property="*" name="up"/> <br></br> <form action="SendMailBean.jsp" method="post"> <center> <h2 style="color:red;"> Fill each field and click on SendMail to send the information</h2> </center> <table align="center" > RAJ NARAYAN MISHRA 5

A website on Crime Reporting 6 <tbody> <tr> <td colspan="3" align="center"> <b> Send Mail </b> </td> </tr> <tr> <td> To </td> <td> : </td> <td> <input type="text" name="to" value="" /> </td> </tr> <tr> <td> Subject </td> <td> : </td> <td> <input type="text" name="subject" value="" /> </td> </tr> <tr> <td> Message </td> <td> : </td> <td> <textarea name="message" rows="20" cols="50"> complaint details name:<jsp:getProperty property="c_name" name="up"/> contact:<jsp:getProperty property="c_contact" name="up"/> age:<jsp:getProperty property="c_age" name="up"/> sex:<jsp:getProperty property="c_sex" name="up"/> address:<jsp:getProperty property="c_address" name="up"/> district:<jsp:getProperty property="c_dist" name="up"/> country:<jsp:getProperty property="c_country" name="up"/> Incident Place place:<jsp:getProperty property="i_place" name="up"/> state:<jsp:getProperty property="i_state" name="up"/> district:<jsp:getProperty property="i_dist" name="up"/> date:<jsp:getProperty property="i_date" name="up"/> Victims Details name:<jsp:getProperty property="v_name" name="up"/> no of victims:<jsp:getProperty property="no_of_victims" name="up"/> age:<jsp:getProperty property="v_age" name="up"/> sex:<jsp:getProperty property="v_sex" name="up"/> address:<jsp:getProperty property="v_address" name="up"/> pin code:<jsp:getProperty property="v_pincode" name="up"/> district:<jsp:getProperty property="v_dist" name="up"/> state:<jsp:getProperty property="v_state" name="up"/> religion:<jsp:getProperty property="v_religion" name="up"/> caste:<jsp:getProperty property="v_caste" name="up"/> </textarea></td> </tr> <tr> <td colspan="3" align="center"> <input type="submit" value="Send Mail" /> RAJ NARAYAN MISHRA

A website on Crime Reporting 7 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" value="Reset" /> <td> </tr> </tbody> </table> </form> </body> </html> SENDMAIL.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="serv.beanI"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <jsp:useBean id="mail" scope="session" class="jmail.mail" /> <jsp:setProperty name="mail" property="to" param="to" /> <jsp:setProperty name="mail" property="from" value="[email protected]" /> <jsp:setProperty name="mail" property="smtpServ" value="smtp.gmail.com" /> <jsp:setProperty name="mail" property="subject" param="subject" /> <jsp:setProperty name="mail" property="message" param="message" /> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body > <br></br><br></br><br></br><br></br><center> <form action="indserv" method="post"> <input type="hidden" name="my" value="SendMailBean"></input> <% HttpSession hs=request.getSession(false); beanI bn= (beanI)hs.getAttribute("up"); bn.getC_name(); bn.getC_contact(); bn.getC_age(); bn.getC_address(); bn.getC_dist(); bn.getC_state(); bn.getC_country(); bn.getI_place(); bn.getI_state(); RAJ NARAYAN MISHRA

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(); %> <% String to = mail.getTo(); int result; result = mail.sendMail(); if(result == 0){ out.println("<h2> Mail Successfully Sent to "+to+"</h2>"); } else{ out.println("<h2> !Mail NOT Sent to "+to+"</h2>"); } %> <input type="submit" name="submit" value="click Here To Proceed"></input> </form> <br></br></center> </body> </html> Acnot.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <br></br><br></br><center> RAJ NARAYAN MISHRA

A website on Crime Reporting 9 <h2>Oops! The criminal ID Or Officer ID does not exist</h2> To Go previous<a href="checkAvailability.jsp">click here</a> </center> </body> </html> Assigncase.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" session="true"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <jsp:useBean id="a" class="serv.assignBean"></jsp:useBean> <% //a.setCaseDetails(request.getParameter("caseDetail")); //out.println(request.getParameter("caseDetail")); String x=request.getParameter("crimeId"); String y=request.getParameter("offId"); HttpSession hsy=request.getSession(); hsy.setAttribute("m",x); hsy.setAttribute("y",y); a.setCrimeId(request.getParameter("crimeId")); a.setOffId(request.getParameter("offId")); %> <% if(a.getCaseDetails()!=null){ %> <% RequestDispatcher rd=request.getRequestDispatcher("indserv"); rd.forward(request,response); %> <% } %> <body bgcolor="#33 cc66"> <center><H1> Before Assign Case enter Full details</H1></center> <br><br> <form method="post"> RAJ NARAYAN MISHRA

A website on Crime Reporting 10 <input type="hidden" name="my" value="assign"/><br/><br/> <table align="center" bgcolor="#D59453"> <tr><td rowspan="5"><img src="img/raghava.jpg"></img> <td>Case Details</td><td>&nbsp;&nbsp;</td> <td><input type="text" name="caseDetail" ></td></tr> <tr><td>Crime Id</td><td>&nbsp;&nbsp;</td><td><%=request.getParameter("crimeId") %><br/></td></tr> <tr><td>Officer Id </td><td>&nbsp;&nbsp;</td><td><%=request.getParameter("offId") %><br/></td></tr> <tr><td></td><td>&nbsp;&nbsp;</td><td><input name="assigncase" type="submit" value="assigncase"></td></tr> </table> <br/> </form> </body> </html> Checkavailability.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" session="true"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#666633"> <marquee><h1 style="color:yellow;"><u>Before Assign Case to Officer please check the evidence</u></h1></marquee> <table> <tr><td colspan="5"><img src="img/Picture1.jpg"></td></tr> <tr bgcolor="#CCFF00"><th></th><th align="right"><a href="login.jsp">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.jsp">FIR</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contact.jsp">contact us</a>&nbsp;&nbsp;</th> <th align="left">&nbsp;&nbsp;<a href="search.jsp">CriminalRecord</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="searchOff.jsp">OfficerRecord</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="checkAvailability.jsp">Assign Case</a></th> <th></th></tr> </table> <form action="indserv" method="post"> <input type="hidden" name="my" value="cav"></input> RAJ NARAYAN MISHRA 10

A website on Crime Reporting 11 <br/><br/><br/><br/> <table align="center" bgcolor="#CC9900" > <tr><td rowspan="5"><img src="img/jk.jpg"></img> <td>Criminal ID</td><td><input name="crimeId" type="text"></td></tr> <tr><td>Officer ID</td><td><input name="offId" type="text"></td></tr> <tr><td></td><td><input name="ac" type="submit" value="checkAvailability"></td></tr> <tr><td><br></br></td><td><br></br></td></tr> <tr><td><br></br></td><td><br></br></td></tr> </table> </form> </body> </html>

Contact.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <table> <tr><td colspan="5"><img alt="abc" src="img/Picture1.jpg"/> </td></tr> <tr bgcolor="#CCFF00"><th></th><th align="right"><a href="login.jsp">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.jsp">FIR</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contact.jsp">contact us</a>&nbsp;&nbsp;</th> <th align="left">&nbsp;&nbsp;<a href="search.jsp">CriminalRecord</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="searchOff.jsp">OfficerRecord</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="checkAvailability.jsp">Assign Case</a></th> <th></th></tr> </table> <br><br> <center> Name:Shivakant <br> ContactNo:9650344178 <br> Add:Yamuna Vihar RAJ NARAYAN MISHRA

11

A website on Crime Reporting 12 Delhi-53 <br> E Mail:[email protected] </center> </body> </html> Index.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.util.*" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#999999" > <marquee><h1 style="color:#CC33FF">Format for filing a complaint with the NHRC</h1></marquee> <table> <table align="center"> <tr><td colspan="5"><img alt="abc" src="img/Picture1.jpg"/> </td></tr> <tr bgcolor="#CCFF00"><th></th><th align="right"><a href="login.jsp">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.jsp">FIR</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contact.jsp">contact us</a>&nbsp;&nbsp;</th> <th align="left">&nbsp;&nbsp;<a href="search.jsp">CriminalRecord</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="searchOff.jsp">OfficerRecord</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="checkAvailability.jsp">Assign Case</a></th> <th></th></tr> </table> <br><br> <form action="SendFir.jsp" method="post"> <input type="hidden" name="my" value="index"></input> <table align="left"> <tr><td rowspan="25" align="left"><img alt="indian-police-logovert.jpg"src="img/indian-police-logo-vert.jpg"></img><td><u><b>(1) COMPLAINT'S DETAILS</b></u></td></tr> <tr><td>name</td><td><input name="c_name" type="text" ></td> <td>&nbsp;&nbsp;&nbsp;</td><td>Contact</td><td><input name="c_contact" type="text" ></td></tr> <tr><td>Age</td><td><input name="c_age" type="text" ></td> <td>&nbsp;&nbsp;&nbsp;</td> RAJ NARAYAN MISHRA 12

A website on Crime Reporting 13 <td>sex</td> <td> <label> <input type="radio" name="c_sex" value="male"> male</label> <label> <input type="radio" name="c_sex" value="female"> female</label> </td> </tr> <tr><td>full Address</td><td><input name="c_address" type="text"></td> <td>&nbsp;&nbsp;&nbsp;</td> <td>District</td><td><input name="c_dist" type="text" ></td> </tr> <tr><td>State</td><td><input name="c_state" type="text" ></td><td>&nbsp;&nbsp;&nbsp;</td> <td>Country</td><td><input name="c_country" type="text" ></td></tr> <tr></tr><tr></tr> <tr><td><u><b>(2) INCIDENT DETAILS</b></u></td></tr><tr></tr> <tr><td>Incedent place(village/city/town)</td><td><input name="i_place" type="text" ></td> <td>&nbsp;&nbsp;&nbsp;</td><td>state</td><td><input name="i_state" type="text""></td></tr> <tr><td>District</td><td><input name="i_dist" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td> <td>date of incident</td><td><input name="i_date" type="text" ></td></tr> <tr></tr><tr></tr> <tr><td><u><b>(3) VICTIM'S DETAILS</b></u></td></tr> <tr><td>name of victim</td><td><input name="v_name" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td> <td>no. of victims</td><td><input name="no_of_victims" type="text"></td></tr> <tr><td>age</td><td><input name="v_age" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td><td>sex</td><td> <label> <input type="radio" name="v_sex" value="m"> male</label> <label> <input type="radio" name="v_sex" value="f"> female</label> </td></tr> <tr><td>full address</td><td><input name="v_address" type="text" ></td><td>&nbsp;&nbsp;&nbsp;</td> <td>pin code</td><td><input name="v_pincode" type="text"></td></tr> RAJ NARAYAN MISHRA

13

A website on Crime Reporting 14 <tr><td>district</td><td><input name="v_dist" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td> <td>state</td><td><input name="v_state" type="text"></td></tr> <tr><td>religion</td><td><input name="v_religion" type="text"></td><td>&nbsp;&nbsp;&nbsp;</td> <td>caste</td><td><select name="v_caste"> <option>select</option> <option>obc</option> <option>sc</option> <option>st</option> <option>general</option> </select></td></tr> <tr></tr><tr></tr> <tr><td>click here after fill all the information</td><td><input name="submit" type="submit" value="submit"></td></tr> </table> </form> </body> </html> S1.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> To update the Criminal record Click here--<a href="SCupdate.jsp">Update Criminal INformation</a><br></br> To insert new records of a Criminal Click here--<a href="SCinsert1.jsp">Add new record</a> </body> </html>

SCinsBean.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" RAJ NARAYAN MISHRA

14

A website on Crime Reporting 15 "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> </body> </html> SCinsert.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#88cc55"> <jsp:useBean id="e" class="serv.SCinsBean" scope="session"/> <% e.setCname(request.getParameter("Cname")); e.setCage(request.getParameter("Cage")); e.setCtype(request.getParameter("Ctype")); e.setSex(request.getParameter("sex")); %> <% if ( e.getCname()!=null ) { %> <% RequestDispatcher rd=request.getRequestDispatcher("indserv"); rd.forward(request,response); %> <% } %> <marquee><h1 align="center" style="color:yellow;">Add Details about Criminals</h1><br/><br/></marquee> <form method="post"> RAJ NARAYAN MISHRA

15

A website on Crime Reporting 16 <input type="hidden" name="my" value="SCinsert1"></input> <table align="center" bgcolor="#cc9966"> <tr><td rowspan="20"><img src="img/untitled.bmp"></img></td><td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td>Criminal Name</td><td>&nbsp;</td><td><input name="Cname" type="text" ></td></tr> <tr><td>Age</td><td>&nbsp;</td> <td><input type="text" name="Cage"></td></tr> <tr><td>Crime_type</td><td>&nbsp;</td><td><select name="Ctype"> <option>select</option> <option>murder</option> <option>robbery</option> <option>kiddnap</option> <option>killer</option> </select></td></tr> <tr><td>Gender</td><td>&nbsp;</td><td align="left"><p> <label> <input type="radio" name="sex" value="f"> Female</label> <label> <input type="radio" name="sex" value="m"> Male</label> <br> </p> </td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td><td> <input name="addrecord" type="submit" value="add record"></td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> </table> </form> </body> </html> Search.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> RAJ NARAYAN MISHRA 16

A website on Crime Reporting 17 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#CC99FF" text="#330066"> <marquee><h1>Welcome to Search page</h1></marquee> <table> <tr><td colspan="5"><img alt="abc" src="img/Picture1.jpg"/> </td></tr> <tr bgcolor="#CCFF00"><th></th><th align="right"><a href="login.jsp">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.jsp">FIR</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contact.jsp">contact us</a>&nbsp;&nbsp;</th> <th align="left">&nbsp;&nbsp;<a href="search.jsp">CriminalRecord</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="searchOff.jsp">OfficerRecord</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="checkAvailability.jsp">Assign Case</a></th> <th></th></tr> </table> <br><br> <form action="indserv" method="post"> <input type="hidden" name="my" value="search" /> <table align="center" bgcolor="#99FF99" > <tr><td rowspan="6"><img src="img/imagesCA83D548.jpg"></img><td><h3><b>Type the name below to find record :</b></h3></td></tr> <tr><td align="right"> <input type="text" name="CriminalName"/></td><td> &nbsp;&nbsp; <input type="submit" name="search" value="search" /> </td></tr> <tr><td><br></td> </tr> <tr><td> To insert new records of a Criminal Click here--<a href="SCinsert1.jsp">Add new record</a> </td></tr> </table> </form> </body> </html> Searchoff.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> RAJ NARAYAN MISHRA

17

A website on Crime Reporting 18 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#9999CC" text="#663300"> <marquee><h1><u>Welcome to Search Officer's page</u></h1></marquee> <table > <tr><td colspan="5"><img src="img/Picture1.jpg"></td></tr> <tr bgcolor="#CCFF00"><th></th><th align="right"><a href="login.jsp">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.jsp">FIR</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contact.jsp">contact us</a>&nbsp;&nbsp;</th> <th align="left">&nbsp;&nbsp;<a href="search.jsp">CriminalRecord</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="searchOff.jsp">OfficerRecord</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="checkAvailability.jsp">Assign Case</a></th> <th></th></tr> </table> <br/><br/> <form action="indserv" method="post"> <input type="hidden" name="my" value="searchOff" /> <table align="CENTER" bgcolor="#CCCC66" > <tr><td rowspan="10"><img src="img/kIRAN.jpg"></img><td><h4><b>Type the name below to find record :</b></h4></td></tr> <tr><td align="right"> <input type="text" name="OffName"/></td><td> &nbsp;&nbsp; <input type="submit" name="search" value="search" /> </td></tr> <tr><td><br></td> </tr> <tr><td>To update the Officers record Click here--<a href="SOupdate.jsp">Update Officers Information</a></td></tr> <tr><td>To insert new records of a Officers Click here--<a href="SOinsert1.jsp">Add new record</a></td></tr> <tr><td><br></br></td><td><br></br></td></tr> <tr><td><br></br></td><td><br></br></td></tr> <tr><td><br></br></td><td><br></br></td></tr> <tr><td><br></br></td><td><br></br></td></tr> <tr><td> </table> RAJ NARAYAN MISHRA 18

A website on Crime Reporting 19 </form> </body> </html> Showcrecord.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.util.*"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="java.sql.ResultSet"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#CC9933" text="#990000"> <h1><marquee><u>Criminal Details</u></marquee></h1> <br> <br> <br><br> <%!int i=0;%> <% HttpSession hs1=request.getSession(false); ArrayList al=(ArrayList)hs1.getAttribute("result"); if(al.size()>=0){ //Iterator itr=ld.iterator(); try { Iterator itr=al.iterator(); while(itr.hasNext()){%> <table border="1" align="center" cellspacing="5" bgcolor="#999999" height="50%" width="40%" > <tr><th >info</th><th>data</th></tr> <tr> <td>Crime ID</td><td><%out.println(itr.next()); %></td></tr> <tr> <td>Criminal Name</td><td><%out.println(itr.next()); %></td> </tr> <tr> <td>Age</td><td><%out.println(itr.next()); %></td> </tr> RAJ NARAYAN MISHRA

19

A website on Crime Reporting 20 <tr> <td>Case Type</td><td><%out.println(itr.next()); %></td> </tr> <tr> <td>Sex</td><td><%out.println(itr.next()); %></td> </tr> </table> <%}%> <% }catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println("exception on jsp"); }} if(al.size()==0){ out.println("<h2><center>OOps!! no record found</center></h2>"); } %> <br></br><center> <h3>To Search Again <a href="search.jsp">click here</a></h3></center> </body> </html> showOrecord <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.util.*"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="java.sql.ResultSet"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#CCFFCC"> <h1><marquee><u>Officer Details</u></marquee></h1> <br> <br> <br><br> <%!int i=0;%> <% HttpSession hs1=request.getSession(false); ArrayList al=(ArrayList)hs1.getAttribute("result"); RAJ NARAYAN MISHRA 20

A website on Crime Reporting 21 if(al.size()>=0){ //Iterator itr=ld.iterator(); try { Iterator itr=al.iterator(); while(itr.hasNext()){%> <table border="1" align="center" cellspacing="5" bgcolor="#9934FF" bordercolorlight="#99CC33" height="50%" width="40%" bordercolor="#FF0000" > <tr><th >info</th><th>data</th></tr> <tr> <tr> <td>Officer Id</td><td><%out.println(itr.next()); %></td> </tr> <tr> <tr> <td>Officer Name</td><td><%out.println(itr.next()); %></td> </tr> <tr> <tr><td>location</td><td><%out.println(itr.next()); %></td></tr> </table> <%}%> <% }catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println("exception on jsp"); }} if(al.size()==0){ out.println("<h2><center> oops!!officer Details not found</center></h2>"); } %> <br></br> <center> <h3>To Search Again <a href="searchOff.jsp">click here</a></h3></center> </body> </html> SOinsert.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" RAJ NARAYAN MISHRA

21

A website on Crime Reporting 22 pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#CC9933" text="#0000FF"> <jsp:useBean id="so" class="serv.SOinsBean" scope="session"></jsp:useBean> <% so.setOffName(request.getParameter("offName")); so.setLoc(request.getParameter("loc")); %> <% if ( so.getOffName()!=null) { %> <% RequestDispatcher rd=request.getRequestDispatcher("indserv"); rd.forward(request,response); %> <%} %> <form action="" method="post"> <input type="hidden" name="my" value="SOinsert1"></input> <marquee><h1>Officer's Details</h1></marquee> <center><h3><u>Add Officers Details here:</u></h3></center> <table bgcolor="#996633" align="center" > <tr><td rowspan="8"><img src="img/raghava.jpg"></img></td> <td>officer Name</td><td><input name="offName" type="text"></td> </tr> <tr><td>location</td><td><input name="loc" type="text"/></td></tr> <tr><td></td><td><input type="submit" name="add_off" value="add record"></input></td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td></tr> </table> </form> RAJ NARAYAN MISHRA 22

A website on Crime Reporting 23 </body></html> Soupdate.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.util.*"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#CCFFCC" > <marquee style="color:Brown"><h1>Update Officer Database</h1></marquee> <form action="indserv" method="post"> <input type="hidden" name="my"value="searchid"/> <table bgcolor="#999999"align="center" border="1"><tr> <td>&nbsp;input ID of the officer to update</td> <td>&nbsp;<input type="text" name="offids"></input></td> <td>&nbsp;<input type="submit" name="submit" value="click here"></input>"</td> </tr> </table> <br><br> </form> </body> </html> Soupdate2.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.util.*"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body bgcolor="#CCFFCC" > <marquee style="color:Brown"><h1>Update Officer Database</h1></marquee> <form action="indserv" method="post"> <input type="hidden" name="my" value="updateoff"/> <%!int i=0;%> <% HttpSession hs1=request.getSession(false); RAJ NARAYAN MISHRA

23

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()){%>

<table align="center" bgcolor="#999999"> <tr><th>Officer Id</th><th><% int s1=(Integer)itr.next();out.println(s1);%></th></tr> <tr><th>Officer Name</th><th><%String s2=(String)itr.next();out.println(s2); %></th></tr> <%HttpSession hsm=request.getSession(); hsm.setAttribute("id",s1); hsm.setAttribute("Name",s2);}%> <% }catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println("exception on jsp"); }} if(al.size()==0){ out.println("<h2><center> oops!!officer Details not found</center></h2>"); } %> <tr><td>location</td><td><input type="text" name="location"></input></td></tr> <tr><td></td><td><input type="submit" name="submit" value="update"></input></td></tr> </table> </form> </body> </html>

RAJ NARAYAN MISHRA

24

A website on Crime Reporting 25

CONTROLLER AND DAO LAYER

RAJ NARAYAN MISHRA

25

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

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 { @Override public 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

A website on Crime Reporting 28

Assign.java
package serv; import import import import import import java.sql.Connection; java.sql.DriverManager; java.sql.PreparedStatement; java.sql.ResultSet; java.sql.SQLException; 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); PreparedStatement ps=con.prepareStatement("insert into assigncase(Case_details,crimeID,offID) value(?,?,?); ");

RAJ NARAYAN MISHRA

28

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 block e.printStackTrace(); } } }

Assignbean.java
package 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

A website on Crime Reporting 30

beanI.java
package serv; public class beanI { 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; public int getNo_of_victims() { return no_of_victims; } public void setNo_of_victims(int noOfVictims) { no_of_victims = noOfVictims; } public String getC_name() { return c_name; } public void setC_name(String cName) { c_name = cName; } public String getC_dist() { return c_dist; } public void setC_dist(String cDist) { c_dist = cDist; } public String getC_state() { return c_state; } public void setC_state(String cState) { c_state = cState; } public String getC_address() { return c_address; } public void setC_address(String cAddress) { c_address = cAddress; } public String getC_country() { return c_country; } public void setC_country(String cCountry) { c_country = cCountry; } public String getC_sex() { return c_sex; } public void setC_sex(String cSex) { c_sex = cSex;

RAJ NARAYAN MISHRA

30

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

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; } }

package serv; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement;

Indexconnect.jsp

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

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 block e.printStackTrace(); } try { con= DriverManager.getConnection("jdbc:mysql://localhost:3306/crime","root", "shiva"); smt=con.createStatement(); } catch (Exception e) { // TODO Auto-generated catch block System.out.println("exception occured"+e); } } public void insert(beanI b) { try { PreparedStatement ps=con.prepareStatement("insert into crimes(c_name,c_contact,c_age,c_sex,c_addr,c_dist,c_state,c_country,i_p lace,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

A website on Crime Reporting 34


// TODO Auto-generated catch block System.out.println("exception occured on dao"+e); } } }

package serv; import import import import import import import import import import import import import import import import

Indserv.jsp

java.io.IOException; java.io.PrintWriter; java.sql.ResultSet; java.sql.SQLException; java.util.ArrayList; java.util.Iterator; java.util.Random; javax.servlet.RequestDispatcher; javax.servlet.ServletException; javax.servlet.http.HttpServlet; javax.servlet.http.HttpServletRequest; javax.servlet.http.HttpServletResponse; javax.servlet.http.HttpSession; javax.validation.Validation; javax.validation.Validator; 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

A website on Crime Reporting 35


protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub PrintWriter 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 block System.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

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 block e.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

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

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/checkAvailabi lity.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

A website on Crime Reporting 39

SCinsBean.java
package serv; import org.hibernate.validation.constraints.NotEmpty; public class SCinsBean { @NotEmpty String 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

A website on Crime Reporting 40

import import import import import import import

java.sql.Connection; java.sql.DriverManager; java.sql.PreparedStatement; java.sql.ResultSet; java.sql.SQLException; java.sql.Statement; 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

A website on Crime Reporting 41


ps.setString(3,sb.getCtype()); ps.setString(4,sb.getSex()); ps.executeUpdate(); return 0; } public int check(String c1) { int ID = 0; if(c1!=null){ int c=Integer.parseInt(c1); String S="select * from Criminal_Details where id="+c+""; try { rs=smt.executeQuery(S); while(rs.next()){ ID=rs.getInt(1);

System.out.println("*****************************"+ID); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.print("exception in check method"); } } return ID; } public ArrayList search(String s) { ArrayList al=new ArrayList(); String s1="select * from Criminal_Details where CName='"+s+"'"; try { rs=smt.executeQuery(s1); while(rs.next()) { al.add(rs.getInt(1)); al.add(rs.getString(2)); al.add(rs.getInt(3)); al.add(rs.getString(4)); //al.add(rs.getString(5)); al.add(rs.getString(6)); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println("exception in search crime class"); } return al; }

RAJ NARAYAN MISHRA

41

A website on Crime Reporting 42


}

package serv; import import import import import import import

Searchoff.java

java.sql.Connection; java.sql.DriverManager; java.sql.PreparedStatement; java.sql.ResultSet; java.sql.SQLException; java.sql.Statement; 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 stub 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 in officers"+e); // TODO: handle exception } } 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+"' where off_id="+id1+""; try { //PreparedStatement ps=con.prepareStatement("S1"); public

RAJ NARAYAN MISHRA

42

A website on Crime Reporting 43


// ps.setString(1, loc);

smt.executeUpdate("Update officer set location="+locate+"where off_id="+id1); return; } catch (SQLException e) { // TODO Auto-generated catch block System.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

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 block e.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 block e.printStackTrace(); System.out.println("exception in search officers } } } return al;

class");

RAJ NARAYAN MISHRA

44

A website on Crime Reporting 45

package serv;

SOinsBean.jsp

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

A website on Crime Reporting 46

RAJ NARAYAN MISHRA

46

A website on Crime Reporting 47

RAJ NARAYAN MISHRA

47

A website on Crime Reporting 48

Screen Shot

RAJ NARAYAN MISHRA

48

A website on Crime Reporting 49

Main page

FIR Form
RAJ NARAYAN MISHRA 49

A website on Crime Reporting 50

Send details to the senior faculty

Criminal Record

RAJ NARAYAN MISHRA

50

A website on Crime Reporting 51

Officer Record

Add Officer Record

RAJ NARAYAN MISHRA

51

A website on Crime Reporting 52

Update Officer Record

Update Officer Record

RAJ NARAYAN MISHRA

52

A website on Crime Reporting 53

Check the availability of the criminal and the officer

Assign case with full details

RAJ NARAYAN MISHRA

53

A website on Crime Reporting 54

System Security

RAJ NARAYAN MISHRA

54

A website on Crime Reporting 55

SYSTEM SECURITY
Introduction One might think that there is a little reason to be concerned about security in an intranet. 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

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

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 they would 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

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 increased use 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

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, that need 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

A website on Crime Reporting 60

c) Secure/ Encrypted Transactions One can further enhanced security on ones intranet by encrypting Web transactions. When one use an encryption facility, information submitted by customers using Web fill-in formsincluding 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

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

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 parallel way 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

A website on Crime Reporting 63 Aspects of Implementation The two aspects of implementation are: Training Personnel Conversion Procedures

TRAINING Even well designed and technically elegant systems can succeed or fail because of the way they are used. Therefore the quality of the training received by the personnel involved with the system in various ways helps or hinders, and may even prevent, the successful implementation of an information system. Since, Human Resource Recruitment Process is web-based and user friendly, not much effort was required in training process.

CONVERSION: Conversion is the process of changing from the old system to the new system. There are two methods of handling systems conversion: Parallel Run Immediate cut-off

RAJ NARAYAN MISHRA

63

A website on Crime Reporting 64 Parallel Run In this approach, the old system and the new system are used simultaneously for some period of time so that the performance of the new system can be monitored and compared with that of the old system. Also in case of failure of the new system, the user can fall back on the old system. The risk of this approach is that the user may never want to shift to new system.

Immediate cut-off
In this method, the use of the old system ceases as soon as the new system is implemented and bought in to palace. The old system becomes redundant from the day of implementation of the new system. There is the high risk involved in this approach if the new system is not tested rigorously. This is because of the fact that if the new system fails, then there will not be anything to fall back upon. The advantage of this approach is that both the systems need not be used simultaneously.

Implementation Tools The project was implemented using Java server pages,HTML,Java beans.The implementation work was carried out in Windows XP/2000 server platform. 1) J2EE 2) Web logic 8.1 3) My sql

RAJ NARAYAN MISHRA

64

A website on Crime Reporting 65 Coding This means program construction with procedural specifications has finished and the coding for the program begins: Once the design phase was over,coding commenced Coding is natural consequence of design. Coding step translate a detailed design representation of software into a programming languae realization. Main emphasis while coding was on style so that the end result was an optimized code. The following points were kept into cosideration while coding:

Coding Style The structured programming method was used in all the modules the project.It incorporated the following features The code has been written so that the definition and implementation of each function is contained in one file. A group of related function was clubbed together in one file to include it when needed and save us from the labour of writing it again and again.

Naming Convention: As the project size grows,so does the com[plexity of recognizing the purpose of the variables.Thus the variables were given meaningful names,whihch would hellp in understanding the context and the purposse of the variable.

RAJ NARAYAN MISHRA

65

A website on Crime Reporting 66 The function names are also given meaningful names that can be easily understood by the user.

Indentation Judicious use of indentation can make the task of reading and understanding a program much simpler.Indentation is an essential part of a goog program.If code id intended without thought itv will seriously affect the readability of the program. The higher-level statements like he definition of the variables,constants and the function are intended,with each nested block intended,stating their purpose in the code. Blank line is also left between each function definition to make the code look neat. Indentation for each source file stating he purpose of the file is also done.

RAJ NARAYAN MISHRA

66

A website on Crime Reporting 67

MAINTENANCE

RAJ NARAYAN MISHRA

67

A website on Crime Reporting 68 MAINTENANCE Maintenance or enhancement can be classified as: Corrective Adaptive Perfective. Corrective maintenance means repairing processing or performance failures or making changes because of previously uncorrected problems or false assumptions. Adaptive maintenance means changing the program function. Perfective maintenance means enhancing the performance or modifying the program(s) to respond to the users additional or changing needs. Maintenance is actually the implementation of the post implementation review plan. As important as it is, many programmers and analysts are reluctant to perform or identify themselves with the maintenance effort. There are psychological, personality and professional reasons for this. In any case, a first class effort must be made to ensure that software changes are made properly and in time to keep the system in tune with user specifications. Maintenance is costly. One way to reduce maintenance costs is through maintenance management and software modification audits. Software modification consists of program rewrites system level updates, and re-audits of low ranking programs to verify and correct the soft spots. The outcome should be more reliable software, a reduced maintenance backlog, and higher satisfaction and morale among the maintenance staff.

RAJ NARAYAN MISHRA

68

A website on Crime Reporting 69

CONCLUSION

RAJ NARAYAN MISHRA

69

A website on Crime Reporting 70

Conclusion:
This project report details all functionality that will be covered while using the CRIME REPORTING. The project CRIME REPORTING was successfully developed and deployed within the specified deadline with zero defects and no errors . The application fully complies with the standard norms and conventions of the POLICE department and was built following the best practices of the IT industry. This system is an open application where in new developed applications can easily be integrated with the existing system. During the development of the project , I got ample opportunities to learn new things, which will definitely be useful in my career. I also learnt about the different tools, for instance Eclipse and web logic, which are used for this project . The technology used in the development of CRIME REPORTING was not new to me but it was a great experience learning the advance technologies of java such as MVC Models of Beans and rich client platform. My task was made easier by the continuous technical support from my team and the inspiring leadership of my project manager and project leader. Apart from the academics I also learnt a lot of behavioral skills. I realized how important it is to work in a team and that we always achieve more when we work together. It wont be an exaggeration to say that now Im not only an improved professional bun an improved individual as well.

RAJ NARAYAN MISHRA

70

A website on Crime Reporting 71

References Books:
The Complete Reference : Java 2 Fifth Edition By Herbert Schildt Head First Java :2nd edition By Kathy Sierra and Bert Bates Head First Servlet and Jsp :2nd edition By Kathy Sierra and Bert Bates J2EE : The J2EE Architects Handbook By Derek Ashmore

Links:

Java.sun.com/products/ejb/developers-guide.pdf http://java.sun.com/j2ee/1.4/docs/tutorial/doc/

RAJ NARAYAN MISHRA

71

A website on Crime Reporting 72

Appendix
DFD:
A Data Flow Diagram (DFD) is a graphic representation of the flow of data through business functions or processes. More generally, a data flow diagram is used for the visualization of data processing. It illustrates the processes, data stores, and external entities, data flows in a business or other system and the relationships between these things . Physical DFDs represent physical files and transactions , while logical or conceptual DFDs can be used to represent business functions or processes. Data Flow Diagrams (DFDs ) are a graphical / representation of systems and systems components. They show the functional relationships of the values computed by a system, including input values , output values, and internal data stores. Its a graph showing the flow of data values from their sources in objects through processes/ functions that transform them to their destinations in other objects. from its raw state. Some authors use a DFD to show control information, other might not. A DFD can be seen as a method of organizing data

DFD NOTATION USED:


External Entities / Terminator: These lie outside of the system being modeled. Terminators represent where the information comes form & where it goes . In designing a system , we have no idea about what these terminators do or how they do it

RAJ NARAYAN MISHRA

72

A website on Crime Reporting 73

Processes: Modify the input in the process of generating the outputs. Data Stores: Represent a place in the process where data comes to rest . A DFD does not say anything about the relative timing of the processes , so a data store might be a place to accumulate data over a year for the annual accounting process. Data Flows: Represents how data moves between terminators , processes, & data stores(Those that cross the system boundary are known as IO or Input Output Description).

Symbols used for DFD:


An Open rectangle is used for to represent a Data Store. The rectangle is used to represent the Data Source / Data Destination within the system. The arrow is used for showing the Data Flow in the System. Ovals are used for showing the Process of the System.

E-R Diagram
Data models are tools used in analysis to describe the data requirements and assumptions in the system from a top-down perspective. It is a major data modeling tool & will help organizing the data in our project into entities & define the relationship between the entities. They also set the stage for the design of databases later on in the SDLC.

RAJ NARAYAN MISHRA

73

A website on Crime Reporting 74

Basic Elements in E-R Models:


Entities : A data entity is anything real or abstract about which we want to store the data. Entity type falls into five classes: roles, events, location, tangible things or concepts. Attributes: A data attributes is a characteristic common to all or most instances of a particular entity . An attribute or combination of attributes that uniquely identifies one & only one instance of entity is called primary key or identifier. Relationships: Relationship provides the structure needed to draw information form multiple entities . It is a natural association that exists between one or more entities. Cardinality: Cardinality defines the number of occurrences of one entity for a single occurrence on one entity for a single occurrence of related entity.

RAJ NARAYAN MISHRA

74

You might also like