A Project Report: Submitted in Partial Fulfillment For The Award of The Degree of
A Project Report: Submitted in Partial Fulfillment For The Award of The Degree of
PROJECT REPORT
On
CITY PORTAL
Submitted
In partial fulfillment
For the award of the Degree of
Bachelor of Technology
In
(2016-2020)
«• = ri zt\* ’
so r i w « •›
Ttys is \n certify Ouu hfiss. Ast)›s Ra vat I ss successfully completed 75 days internship yr‹›bmni
at Amerigo hol\warvs. I ie I as \vurLcd as a part ofdcx'clnyment team end hzs cnmplctcJ ‹A e
tasL assigned In him.
Words are inadequate in offering our thanks to Mr. Sanjay Tiwari, Head of CSE Department, for
consistent encouragement and support for shaping our project in the presentable form.
We also express our deepest thanks to Mr. Arpit Kumar Sharma Seminar Coordinator, for his
support in providing technical requirement and fulfilling our various other requirements for making
our project success.
We also like to express our thanks to all supporting CSE faculty members who have been a constant
source of encouragement for successful completion of the project.
Also our warm thanks to Arya Institute of Engineering Technology and Management, who
provided us this opportunity to carryout, this prestigious Project and enhance our learning in various
technical fields.
Astha Rawat
i
CANDIDATE DECLARATION
We hereby declare that the work, which is being presented in the Seminar entitled “JAVA” in
partial fulfillment for the award of Degree of “Bachelor of Technology” in Computer Engineering,
and submitted to the Department of Computer Science Engineering, ARYA Institute of
Engineering Technology and Management, Affiliated to Rajasthan Technical University is a record
of my own work carried out under the Guidance of Mr. Arpit Kumar Sharma, Assistant
Professor, Department of Computer Science & Engineering.
(Signature of Candidate)
Astha Rawat
Roll No- 16EAOCS009
TABLE OF CONTENTS
ACKNOWLEDGEMENT i
CANDIDATE DECLARATION ii
TABLE OF CONTENTS iii-iv
LIST OF FIGURE v-vi
ABSTRACT 1
CHAPTER 1 INTRODUCTION 2
1.1 Project Scope 2
1.2 Project Objectives 2
1.3 Purpose 2
1.4 Key features of City Portal 2
CHAPTER-2 HARDWARE AND SOFTWARE REQUIREMENT SPECIFICATION 4
2.1 Hardware Requirements 4
2.2 Software Requirements 4
2.2.1 Operating System 4
2.2.2 Language 6
2.2.3 Front end 7
2.2.4 Backend 8
2.2.5 Other Software 12
CHAPTER-3 USE CASE DIAGRAM AND DATA FLOW DIAGRAM 14
3.1 Use Case Diagram 14
3.1.1 Use Case Diagram of City Portal 15
3.2 Data Flow Diagram 15
3.2.1 Data Flow Diagrams of Project 17
CHAPTER 4 MODULES OF THE PROJECT 19
4.1 Modules of Project 19
4.1.1 Search 19
4.1.2 Login 19
4.1.3 Registration Process 19
4.1.4 Manage Information 19
CHAPTER 5 SOURCE CODES 20
5.1 Source Code for index.jsp 20
AIETM/7CSPR/CITY PORTAL iii
5.2 Source Code for registration.jsp 22
5.3 Source Code for login_user.jsp 23
5.4 Source Code for edit_info_user_form.jsp 25
5.5 Source Code for edit_user_db.jsp 27
5.6 Source Code for add_information_user.jsp 29
5.7 Source Code for add_category_db.jsp 32
5.8 Source Code for add_info_user_db.jsp 33
5.9 Source Code for verify_information.jsp 35
5.10 Source Code for create_table.jsp 37
5.11 Source Code for edit_info_user_db.jsp 38
5.12 Source Code for search.jsp 39
5.13 Source Code for upload_photos.jsp 41
CHAPTER 6 IMPLEMENTATION 43
6.1 Front End 43
6.2 Implementation Details 43
6.2.1 User Section 43
6.2.2 Admin Section 51
6.3 Contact us page : 55
6.4 About us page : 55
6.5 Backend 56
CONCLUSION 58
FUTURE SCOPE OF PROJECT 59
REFERENCES 60
LIST OF FIGURE
S.NO. FIGURE NAME PAGE NO.
Fig 2.1 JDBC 16
Fig 3.1 Use Case Diagram for City Portal 20
Fig 3.2 Data Flow Diagram Notation 21
Fig 3.3 Data Flow Diagram of project 22
Fig 3.4 Context Level DFD of City Portal 23
Fig 3.5 First Level DFD of City Portal 23
Fig 6.1 User Interface 48
Fig 6.2 Registration 49
Fig 6.3 User Detail 49
Fig 6.4 Message Displayed 50
Fig 6.5 Categories of city 50
Fig 6.6 Details of Categories 51
Fig 6.7 Map of City Portal 52
Fig 6.8 Locations in a map 52
Fig 6.9 Naviagtion using map 53
Fig 6.10 User login 53
Fig 6.11 User Page 54
Fig 6.12 Add information Page 54
Fig 6.13 Adding Information 55
Fig 6.14 Update Profile Page 55
Fig 6.15 Admin Login Page 56
Fig 6.16 Admin page 56
Fig 6.17 Add Category Page 57
Fig 6.18 Adding Category 57
Fig 6.19 Add Information Page 58
Fig 6.20 Adding Information 58
Fig 6.21 Modify Information Page 59
Fig 6.22 Modifying Information 59
Fig 6.23 Contact us Page 60
Fig 6.24 About us Page 60
Fig 6.25 Database Table 61
Fig 6.26 User Table 61
Fig 6.27 Information Table 62
Fig 6.28 Category Table 62
ABSTRACT
City Portal is a web based project that provides various information about a city and the categories
available in the city so that people can easily explore a city. The objective was to help the new visitor
in the city. This will help the person to get to the desired place easily.
The most significant finding is that when a tourist visits a new country or city they have to suffer with
lot of struggle to find their place in that new city. This Java based application will help them in finding
their place easily.
There are two section in the City Portal one is the user section and other is the admin section. new user
can easily signup in the form and then log in to the application. Then they can select the category for
which then want information i.e. hotel, restro, gym, etc . After selecting the category the user will get
the complete information about that place. Now there is a link for map in City Portal where the user
can get his current location and gave the location where he wants to go.
In the Admin section the admin can add the category and add new information of the places which are
newly formed and he can also modify the information which is entered by the user.
The portal aims to provide complete information about city using the following two mechanisms:
Information given by users is to be presented on the web site after through verification by
admin.
Information to be collected through classifieds posted on the portal by various social,
businesses, educational and professional entities having operations in a city is to be presented.
The objective of this is that the found their place easily without wasting lot of time
1.3 Purpose
The software is to get the information about city.
It maintains level of users-
User Level- Data Entry Operator
Admin level- Data Handeled Operator
Backend : Servlets
Windows
Introduced by Windows Microsoft Windows is a group of several graphical operating system families,
all of which are developed, marketed, and sold by Microsoft. Each family caters to a certain sector of
the computing industry. Active Windows families include Windows NT and Windows Embedded;
these may encompass subfamilies, e.g. Windows Embedded Compact (Windows CE) or Windows
Server. Defunct Windows families include Windows 9x, Windows Mobile and Windows Phone.
Microsoft introduced an operating environment named Windows on November 20, 1985, as a graphical
shell for MS-DOS in response to the growing interest in graphical user interfaces (GUIs). Microsoft
Windows came to dominate the world's personal computer (PC) market with over 90% market share,
overtaking Mac OS, which had been introduced in 1984.Apple came to see Windows as an unfair
encroachment on their innovation in GUI development as implemented on products such as the Lisa
and Macintosh (eventually settled in court in Microsoft's favour in 1993). On PCs, Windows is still the
most popular operating system. However, in 2014, Microsoft admitted losing the majority of the
overall operating system market to Android, because of the massive growth in sales of Android smart
phones.
Some Earlier Versions of Windows:
Windows Vista : After a lengthy development process, Windows Vista was released on
November 30, 2006, for volume licensing and January 30, 2007, for consumers. It contained a
number of new features, from a redesigned shell and user interface to significant technical
changes, with a particular focus on security features .
Windows 7 : On July 22, 2009, Windows 7 and Windows Server 2008 R2 were released as
RTM (release to manufacturing) while the former was released to the public 3 months later on
October 22, 2009. Unlike its predecessor, Windows Vista, which introduced a large number of
new features, Windows 7 was intended to be a more focused, incremental upgrade to the
Windows line, with the goal of being compatible with applications and hardware with which
Windows Vista was already compatible.
Windows 8 and 8.1 : Windows 8, the successor to Windows 7, was released generally on
October 26, 2012. A number of significant changes were made on Windows 8, including the
introduction of a user interface based around Microsoft's Metro design language with
optimizations for touch-based devices such as tablets and all-in-one PCs. These changes
include the Start screen, which uses large tiles that are more convenient for touch interactions
and allow for the display of continually updated information, and a new class of apps which are
designed primarily for use on touch-based devices.
2.2.2 Language
Java
Java is a set of computer software and specifications developed by Sun Microsystems, later acquired
by Oracle Corporation that provides a system for developing application software and deploying it in a
cross-platform computing environment.
Java is used in a wide variety of computing platforms from embedded devices and mobile phones to
enterprise servers and supercomputers. While less common, Java applets run in secure, sandboxed
environments to provide many features of native applications and can be embedded in HTML pages.
The Java platform is a suite of programs that facilitate developing and running programs written in the
Java programming language. A Java platform will include an execution engine (called a virtual
machine), a compiler and a set of libraries; there may also be additional servers and alternative libraries
that depend on the requirements. Java is not specific to any processor or operating system as Java
platforms have been implemented for a wide variety of hardware and operating systems with a view to
Java programs running identically on all of them.
Platforms target different classes of device and application domain:
i ) Java Card: A technology that allows small Java-based applications (applets) to be run securely on
smart cards and similar small-memory devices.
ii) Java ME (Micro Edition): Specifies several different sets of libraries (known as profiles) for devices
with limited storage, display, and power capacities. Often used to develop applications for mobile
devices, PDAs, TV set-top boxes, and printers.
iii) Java SE (Standard Edition): For general-purpose use on desktop PCs, servers and similar devices.
iv) Java EE (Enterprise Edition): Java SE plus various APIs useful for multi-tier client–server
enterprise applications.
CSS:
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a
document written in a mark-up like HTML. CSS is a cornerstone technology of the World Wide Web,
alongside HTML and JavaScript.
CSS is designed to enable the separation of presentation and content, including layout, colours, and
fonts This separation can improve content accessibility, provide more flexibility and control in the
specification of presentation characteristics, enable multiple web pages to share formatting by
specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the
structural content.
Bootstrap
Bootstrap is a free and open-source front-end framework (library) for designing websites and web
applications. It contains HTML- and CSS-based design templates for typography, forms, buttons,
navigation and other interface components, as well as optional javascript extensions.
Bootstrap is modular and consists of a series of Less stylesheets that implement the various
components of the toolkit. These stylesheets are generally compiled into a bundle and included in web
pages, but individual components can be included or removed. Bootstrap provides a number of
configuration variables that control things such as color and padding of various components.
2.2.4 Backend
Servlets:
A Java servlet is a Java program that extends the capabilities of a server. Although servlets can
respond to any types of requests, they most commonly implement applications hosted on Web servers.
Such Web servlets are the Java counterpart to other dynamic Web content technologies such as PHP
and ASP.NET. A Java servlet processes or stores a Java class in Java EE that conforms to the Java
Servlet API, a standard for implementing Java classes that respond to requests. Servlets could in
principle communicate over any client–server protocol, but they are most often used with the HTTP.
Thus "servlet" is often used as shorthand for "HTTP servlet".Thus, a software developer may use a
servlet to add dynamic content to a web server using the Java platform. The generated content is
commonly HTML, but may be other data such as XML and more commonly, JSON. Servlets can
maintain state in session variables across many server transactions by using HTTP cookies, or URL
rewriting.
The Java servlet API has, to some extent, been superseded by two standard Java technologies for web
services:
the Java API for RESTful Web Services (JAX-RS 2.0) useful for AJAX, JSON and REST
services, and
the Java API for XML Web Services (JAX-WS) useful for SOAP Web Services.
To deploy and run a servlet, a web container must be used. A web container (also known as a servlet
container) is essentially the component of a web server that interacts with the servlets. The web
container is responsible for managing the lifecycle of servlets, mapping a URL to a particular servlet
and ensuring that the url requester has correct access rights. The Servlet API, contained in the Java
package hierarchy javax.servlet . , defines the expected interactions of the web container and a servlet.
The following is a typical user scenario of these methods:
1. Assume that a user requests to visit a URL.
The browser then generates an HTTP request for this URL.
This request is then sent to the appropriate server.
2. The HTTP request is received by the web server and forwarded to the servlet container.
The container maps this request to a particular servlet.
The servlet is dynamically retrieved and loaded into the address space of the container.
3. The container invokes the init () method of the servlet.
This method is invoked only when the servlet is first loaded into memory.
It is possible to pass initialization parameters to the servlet so that it may configure itself.
5. The servlet remains in the container's address space and is available to process any other HTTP
requests received from clients.
JSP
Java Server Pages (JSP) is a technology for developing Webpages that supports dynamic content. This
helps developers insert java code in HTML pages by making use of special JSP tags, most of which
start with <% and end with %>.
A JavaServer Pages component is a type of Java servlet that is designed to fulfill the role of a user
interface for a Java web application. Web developers write JSPs as text files that combine HTML or
XHTML code, XML elements, and embedded JSP actions and commands.
Using JSP, you can collect input from users through Webpage forms, present records from a database
or another source, and create web pages dynamically.
JSP tags can be used for a variety of purposes, such as retrieving information from a database or
registering user preferences, accessing JavaBeans components, passing control between pages, and
sharing information between requests, pages etc.
Web Server
Web server refers to server software, or hardware dedicated to running said software, that can serve
contents to the World Wide Web. A web server processes incoming network requests over the HTTP
protocol (and several other related protocols). he primary function of a web server is to store, process
and deliver web pages to clients. The communication between client and server takes place using the
Hypertext Transfer Protocol (HTTP). Pages delivered are most frequently HTML documents, which
may include images, style sheets and scripts in addition to the text content. A user agent, commonly a
web browser or web crawler, initiates communication by making a request for a specific resource using
HTTP and the server responds with the content of that resource or an error message if unable to do so.
The resource is typically a real file on the server's secondary storage, but this is not necessarily the case
and depends on how the web server is implemented.
Apache Tomcat
Apache Tomcat (also referred to as Tomcat Server) implements several Java EE specifications
including Java Servlet, Java Server Pages (JSP), Java EL, and WebSocket, and provides a
"pure Java environment in which Java can run.
This is the most popular web server in the world developed by the Apache Software Foundation.
Apache web server is an open source software and can be installed on almost all operating systems
including Linux, UNIX, Windows, FreeBSD, Mac OS X and more. About 60% of the web server
machines run the Apache Web Server.
Tomcat is developed and maintained by an open community of developers under the auspices of
the Apache Software Foundation released under the Apache License 2.0 license, and is open source
software .
We are using Apache Tomcat version 8.5. Apache Tomcat 8.5.x supports the same Servlet, JSP, EL,
and WebSocket Specification versions as Apache Tomcat 8.0.x. In addition to that, it also implements
the JASPIC 1.1 specification.
JDBC
JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and execute the query
with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to
connect with the database. There are four types of JDBC drivers:
o JDBC-ODBC Bridge Driver,
o Native Driver,
o Thin Driver
Before JDBC, ODBC API was the database API to connect and execute the query with the database.
But, ODBC API uses ODBC driver which is written in C language (i.e. platform dependent and
unsecured). That is why Java has defined its own API (JDBC API) that uses JDBC drivers (written in
Java language).
We can use JDBC API to handle database using Java program and can perform the following activities:
1. Connect to the database
2. Execute queries and update statements to the database
3. Retrieve the result received from the database.
MySQL Database
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL is
developed, marketed and supported by MySQL AB, which is a Swedish company. MySQL is
becoming so popular because of many good reasons −
MySQL is released under an open-source license. So you have nothing to pay to use it.
MySQL is a very powerful program in its own right. It handles a large subset of the
functionality of the most expensive and powerful database packages.
MySQL works on many operating systems and with many languages including PHP, PERL, C,
C++, JAVA, etc.
MySQL works very quickly and works well even with large data sets.
MySQL is very friendly to PHP, the most appreciated language for web development.
MySQL supports large databases, up to 50 million rows or more in a table. The default file size
limit for a table is 4GB, but you can increase this (if your operating system can handle it) to a
theoretical limit of 8 million terabytes (TB).
MySQL is customizable. The open-source GPL license allows programmers to modify the
MySQL software to fit their own specific environments.
The Java Development Kit (JDK) is one of three core technology packages used in Java programming,
along with the JVM (Java Virtual Machine) and the JRE (Java Runtime Environment). It's important
to differentiate between these three technologies, as well as understanding how they're connected:
Eclipse IDE: Eclipse is an integrated development environment (IDE) for developing applications
using the Java programming language and other programming languages such as C/C++, Python,
PERL, Ruby etc.
The Eclipse platform which provides the foundation for the Eclipse IDE is composed of plug-ins and
is designed to be extensible using additional plug-ins. Developed using Java, the Eclipse platform can
be used to develop rich client applications, integrated development environments and other tools.
Eclipse can be used as an IDE for any programming language for which a plug-in is available.
The Java Development Tools (JDT) project provides a plug-in that allows Eclipse to be used as a Java
IDE, PyDev is a plugin that allows Eclipse to be used as a Python IDE, C/C++ Development Tools
(CDT) is a plug-in that allows Eclipse to be used for developing application using C/C++, the Eclipse
Scala plug-in allows Eclipse to be used an IDE to develop Scala applications and PHP eclipse is a
plug-in to eclipse that provides complete development tool for PHP.
CHAPTER 3
USE CASE DIAGRAM AND DATA FLOW DIAGRAM
A use case diagram doesn't go into a lot of detail—for example, don't expect it to model the order in
which steps are performed. Instead, a proper use case diagram depicts a high-level overview of the
relationship between use cases, actors, and systems. Experts recommend that use case diagrams be
used to supplement a more descriptive textual use case.
UML is the modelling toolkit that you can use to build your diagrams. Use cases are represented with a
labelled oval shape. Stick figures represent actors in the process, and the actor's participation in the
system is modelled with a line between the actor and use case. To depict the system boundary, draw a
box around the use case itself.
Actors: The users that interact with a system. An actor can be a person, an organization, or an
outside system that interacts with your application or system. They must be external objects
that produce or consume data.
System: A specific sequence of actions and interactions between actors and the system. A
system may also be referred to as a scenario.
Goals: The end result of most use cases. A successful diagram should describe the activities
and variants used to reach the goal.
A data flow diagram (DFD) maps out the flow of information for any process or system. It uses
defined symbols like rectangles, circles and arrows, plus short text labels, to show data inputs, outputs,
storage points and the routes between each destination. Data flowcharts can range from simple, even
hand-drawn process overviews, to in-depth, multi-level DFDs that dig progressively deeper into how
the data is handled. They can be used to analyse an existing system or model a new one. Like all the
best diagrams and charts, a DFD can often visually “say” things that would be hard to explain in
words, and they work for both technical and nontechnical audiences, from developer to CEO. That’s
why DFDs remain so popular after all these years. While they work well for data flow software and
systems, they are less applicable nowadays to visualizing interactive, real-time or database-oriented
software or systems.
Using any convention’s DFD rules or guidelines, the symbols depict the four components of data flow
diagrams.
External entity: an outside system that sends or receives data, communicating with the system
being diagrammed. They are the sources and destinations of information entering or leaving the
system. They might be an outside organization or person, a computer system or a business
system. They are also known as terminators, sources and sinks or actors. They are typically
drawn on the edges of the diagram.
Process: any process that changes the data, producing an output. It might perform
computations, or sort data based on logic, or direct the data flow based on business rules. A
short label is used to describe the process, such as “Submit payment.”
Data store: files or repositories that hold information for later use, such as a database table or a
membership form. Each data store receives a simple label, such as “Orders.”
Data flow: the route that data takes between the external entities, processes and data stores. It
portrays the interface between the other components and is shown with arrows, typically
labelled with a short data name.
DFD levels:
DFD Level 0 is also called a Context Diagram. It’s a basic overview of the whole system or
process being analysed or modelled. It’s designed to be an at-a-glance view, showing the
system as a single high-level process, with its relationship to external entities. It should be
easily understood by a wide audience, including stakeholders, business analysts, data analysts
and developers.
DFD Level 1 provides a more detailed breakout of pieces of the Context Level Diagram. You
will highlight the main functions carried out by the system, as you break down the high-level
process of the Context Diagram into its sub processes.
DFD Level 2 then goes one step deeper into parts of Level 1. It may require more text to reach
the necessary level of detail about the system’s functioning.
i. Search Module
ii. Login Module
iii. Registration Process Module
iv. Manage Information Module
4.1.1 Search
Through this module users can find their respective information. The user can get details of people
having same source and destination as User’s.
4.1.2 Login
In this module user enter the User id and password is checked and only valid user id and password will
get entry into member’s zone. This is a security feature to avoid entry of unauthorized users.
CHAPTER 5
SOURCE CODES
5.1 Source Code for index.jsp
<%@page import="project.ConnectionProvider,java.sql.*"%>
<div id="content">
<div id="left-content">
<marquee
direction="up">Notifications<br>greater noida yellow pages<br>Notifications<br>greater noida
yellow pages<br>Notifigreater noida yellow pages<br>Notifications<br>greater noida yellgreater
noida yellow pages<br>Notifications<br>greater noida yellow pages<br>Notifigreater noida yellow
pages<br>NotificationsNotifiow pages<br>Notifications<br>greater noida yellow pages<br>greater
noida yellow pages<br></marquee> </div>
<div id="main-content">
<fontcolor="blue"
face="arial"size="30">Greater Noida </font>is a census town with a population of 100,000 in the
Gautam Budh Nagar district of the northern Indian state of Uttar Pradesh.[2] It comes under the
purview of the National Capital Region (NCR) of India. Greater Noida is 30 km and half an hour from
New Delhi.[3] Rama Raman is its present Chairman and Chief Executive Officer.[4] Metro
connectivity from New Delhi to Greater Noida is on top priority as per statement of Rama Raman.[5]
The work on the metro line was subsequently initiated in August, 2015.
</div>
<div id="right-content">
<form action="register_user.jsp" method="post">
<font
color="blue"face="arial"><h2><b><center>Create Account</center></b></h2></font>
<%
String msg=request.getParameter("msg");
if(msg==null)
{}
else if(msg.equalsIgnoreCase("success"))
else if(msg.equalsIgnoreCase("fail"))
else if(msg.equals("invalid"))
%><br>
</div>
<marquee>
<img src="images/g4.png"/>
<img src="images/g5.png"/>
<img src="images/g6.png"/>
<img src="images/g7.png"/>
</marquee>
</div>
pageEncoding="ISO-8859-1"%>
<html>
<head>
</head>
<body>
<%
String username=request.getParameter("username");
String password=request.getParameter("password");
String mobile=request.getParameter("mobile");
String email=request.getParameter("email");
try
Connection con=ConnectionProvider.getCon();
pst.setString(1,username);
pst.setString(2,password);
pst.setString(3,mobile);
pst.setString(4,email);
pst.executeUpdate();
con.close();
response.sendRedirect("index.jsp?msg=success");
catch(Exception e)
response.sendRedirect("index.jsp?msg=fail");
%>
</body>
</html>
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%
String username=request.getParameter("username");
String password=request.getParameter("password");
if(username.equalsIgnoreCase("admin")&&password.equals("admin"))
session.setAttribute("username","admin");
response.sendRedirect("welcome_admin.jsp");
else
try
Connection con=ConnectionProvider.getCon();
pst.setString(1,username);
pst.setString(2,password);
ResultSet rs=pst.executeQuery();
if(rs.next())
session.setAttribute("username",username);
response.sendRedirect("welcome_user.jsp");
}
else
response.sendRedirect("index.jsp?msg=invalid");
}
con.close();
catch(Exception e)
System.out.println(e);
%>
pageEncoding="ISO-8859-1" import="java.sql.*,project.*"%>
<a href="welcome_user.jsp">Back</a>
<%
String infoId=request.getParameter("infoId");
Connection con=ConnectionProvider.getCon();
st.setInt(1,Integer.parseInt(infoId));
ResultSet rs=st.executeQuery();
if(rs.next())
%>
<tr>
</tr>
<tr>
<td><b>Place Name:</b></td><td><input type="text" name="placeName"
value="<%=rs.getString(2)%>" autofocus></td>
</tr>
<tr>
<td><b>Address:</b></td><td><input type="text" name="address" value="<
%=rs.getString(3)%>"></td>
</tr>
<tr>
</tr>
</form>
</table>
<%
con.close();
%>
<br><br>
pageEncoding="ISO-8859-1" import="java.sql.*,project.*"%>
<html>
<head>
</head>
<body>
<%
String infoId=request.getParameter("infoId");
String
categoryName=request.getParameter("categoryName");
String placeName=request.getParameter("placeName");
String address=request.getParameter("address");
String landmark=request.getParameter("landmark");
String contactno=request.getParameter("contactno");
Connection con=ConnectionProvider.getCon();
pst.setString(2,address);
pst.setString(3,landmark);
pst.setString(4,contactno);
pst.setInt(5,Integer.parseInt(infoId));
pst.executeUpdate();
con.close(); response.sendRedirect("edit_info_user.jsp?
msg=updated");
%>
</body>
</html>
5.6 Source Code for add_information_user.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" import="java.sql.*,project.*"%>
<tr>
<td>
<%
String msg=request.getParameter("msg");
if(msg==null)
{}
else if(msg.equalsIgnoreCase("success"))
else if(msg.equalsIgnoreCase("fail"))
{
out.println("<font color=red>Information not Added</font>");
%>
<td>
<tr>
<tr>
<td><center><select name="categoryName">
<%
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
while(rs.next())
String n=rs.getString(2).toUpperCase();
%>
<option value="<%=n%>"><%=n%></option>
<%
con.close();
%>
</select></center></td>
<tr>
<tr>
<tr>
</tr>
</form>
</table>
pageEncoding="ISO-8859-1"%>
<%
try
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
int id=1;
if(rs.next())
id=rs.getInt(1);
id++;
pst.setInt(1,id);
pst.setString(2,category);
pst.executeUpdate();
con.close();
response.sendRedirect("add_category.jsp?msg=success");
catch(Exception e)
response.sendRedirect("add_category.jsp?msg=fail");
%>
pageEncoding="ISO-8859-1" import="java.sql.*,project.*"%>
<%
String placeName=request.getParameter("placeName");
String address=request.getParameter("address");
String contactno=request.getParameter("contactno");
String landmark=request.getParameter("landmark");
String categoryName=request.getParameter("categoryName");
try
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
int id=1;
if(rs.next())
id=rs.getInt(1);
id++;
pst.setString(1,categoryName);
pst.setString(2,placeName);
pst.setString(3,address);
pst.setString(4,contactno);
pst.setString(5,"false");
pst.setInt(6,id);
pst.setString(7,landmark);
String postedBy=(String)session.getAttribute("username");
pst.setString(8,postedBy);
pst.executeUpdate();
con.close();
response.sendRedirect("add_information_user.jsp?msg=success");
catch(Exception e)
response.sendRedirect("add_information_user.jsp?msg=fail");
%>
pageEncoding="ISO-8859-1" import="java.sql.*,project.*"%>
<a href="welcome_admin.jsp">Back</a>
<%
String msg=request.getParameter("msg");
if(msg!=null)
{
out.println("<center>Information updated</center>");
%>
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
while(rs.next())
%>
<tr>
<a href="allow_info.jsp?infoId=<%=rs.getInt(6)%>">Allow</a>
<a href="delete_info.jsp?infoId=<%=rs.getInt(6)%>">Delete</a>
<a href="edit_info.jsp?infoId=<%=rs.getInt(6)%>">Edit</a>
</td>
</tr>
<%
con.close();
%>
</table>
%@include file="footer.jsp"%
<%
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
try
System.out.println(e);
con.close();
%>
pageEncoding="ISO-8859-1" import="java.sql.*,project.*"%>
<html>
<head>
</head>
<body>
<%
String infoId=request.getParameter("infoId");
String
categoryName=request.getParameter("categoryName");
String placeName=request.getParameter("placeName");
String address=request.getParameter("address");
String landmark=request.getParameter("landmark");
String contactno=request.getParameter("contactno");
Connection con=ConnectionProvider.getCon();
pst.setString(2,address);
pst.setString(3,landmark);
pst.setString(4,contactno);
pst.setInt(5,Integer.parseInt(infoId));
pst.executeUpdate();
con.close(); response.sendRedirect("edit_info_user.jsp?
msg=updated");
%>
</body>
</html>
pageEncoding="ISO-8859-1" import="java.sql.*,project.*"%>
<a href="index.jsp">Back</a>
<tr>
<td>
<table>
String categoryName=request.getParameter("categoryName");
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
%>
<tr>
<%
con.close();
%>
</table>
</td>
</tr>
</table>
%@include file="footer.jsp"%
pageEncoding="ISO-8859-1" import="java.sql.*,project.*"%>
<a href="welcome_admin.jsp">Back</a>
<tr><td></td><td><font color="green"><%
String msg=request.getParameter("msg");
if(msg!=null)
out.println("<center>File uploaded</center>");
%></font></td></tr>
</table>
</form>
For example:-if you select hotel then you will get all the details of all the hotels present in that
particular city. The details which are saved in the database about that category are displayed.
As we can see, after searching for hotel, all the informations like address and contact are available for
all hotels. In this way we can get the details about any category present in the database.
Now user can easily navigate to the map and get to the desired location.
STEP 3:
Now in the user section user will also able to give details of the new places in the city. User have to log
in with his username and password.
Fig7.
Fig 6.10 User Login
After log in.
Here the Name of our Database is city. Various tables are maintained in this database namely users,
category, information etc. In these tables records are maintained for the users and the information
regarding the categories available in the city.
Create the table information that will provide the information about the category name,
address, contact.
The future aspect of this project is that this is the service provider application that will provide service
to the new visitors. One can earn profit from this project in many ways. As many visitors who visits the
city also visits the website. The admin of the application will provide adds on the application and earn
profit and in a city if a new hotel will be opened then the hotel management will provide sponsorship
to the application admin and admin will provide templates in its application .In this way the application
will help the users and the admin.
FUTURE SCOPE OF PROJECT
The proposed City Classified and Search Project system looks forward to eliminate the disadvantages
that are associated with the existing system and in return would incorporate few advanced features. The
inclusion of an inline link to the particular pages will enable the user or the seeker or poster to stay
under a single domain and the classifieds websites could be associated with the homepage of the
server. Email subscriptions as well as RSS feeds will be there and email notification system for ad
posting feature would be available. The interface is being given a professional outlook to make it more
users friendly. Updating and editing of the posted ads will be made possible according to the
convenience of the user.
REFERENCES
[1] I. Alexander. Stakeholders: Who is your system for? IEEE: Computing and Control
Engineering,14(1):22{26, April 2003.
[2] I. Alexander and T. Zink. Introduction to systems engineering with use cases. IEEE: Computing
and Control Engineering, 13(6):289{297, December 2002.
[4] S. W. Ambler. Process Patterns: Building Large Scale Systems Using Object Technology. Cam-
bridge University Press, 1998.
[5] M. Andrews and J. A. Whittaker. How to Break Web Software: Functional and Security
Testing of Web Applications and Web Servers. Addison-Wesley, 2006.