0% found this document useful (0 votes)
159 views

A Mini Project Report Submitted in The Partial Fulfillment of The Requirements For The Award of The Degree of

This document summarizes a mini project report on web hosting services submitted for a Bachelor of Technology degree. It describes a web hosting service system developed to dynamically generate web pages according to client requirements. The system allows users to add, delete, or modify web pages. It provides templates that determine page formats and placements of content like images. The administrator is responsible for adding templates. The system has two main modules: Admin and Customer.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
159 views

A Mini Project Report Submitted in The Partial Fulfillment of The Requirements For The Award of The Degree of

This document summarizes a mini project report on web hosting services submitted for a Bachelor of Technology degree. It describes a web hosting service system developed to dynamically generate web pages according to client requirements. The system allows users to add, delete, or modify web pages. It provides templates that determine page formats and placements of content like images. The administrator is responsible for adding templates. The system has two main modules: Admin and Customer.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 64

WEB HOSTING SERVICES

A Mini Project report Submitted in the partial fulfillment of the requirements


for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY

By

A.RAMADEVI 07991A1288
CH.SRIKANTH 07991A1268
E.B SANTOSH 07991A1273
M.RAMESH 07991A12C9

Under the guidance of


Mr. K.NAGARJUNA, B.Tech
Assistant Professor
Information Technology

DEPARTMENT OF INFORMATION TECHNOLOGY


ST.THERESSA INSTITUTE OF ENGINEERING AND TECHNOLOGY
(Affiliated to Jawaharlal Nehru Technological University, Kakinada)
Garividi(cheepurupalli), Vizianagaram Dist-535101.
ST.THERESSA INSTITUTE OF ENGINEERING AND TECHNOLOGY
(Affiliated to Jawaharlal Nehru Technological University, Kakinada)
Department of Information Technology

BONAFIDE CERTIFICATE

This is to certify that A.Ramadevi(07991A1288),CH.Srikanth(07991A1268),

E.BSantosh(07991A1273),M.Ramesh(07991AI2C9)DepartmentofInformation Technology,
having under taken and successfully completed their project report entitled”WEB
HOSTING SERVICES” which is a bonafide work carried out in partial fulfillment for the
award of degree Bachelor of Technology in Information Technology.

Internal Guide Head of the Department

Mr.K.Nagarjuna, B.Tech Prof. A.Daveedu Raju.M.Tech,M.Phil(Ph.D)

Asst.Professor Head of the department

Information Technology Information Technology


ACKNOWLEDGMENT

My express thanks and gratitude and thanks to Almighty God, my parents and
other family members and friends without whose support, I could not have made this project
successful.

We wish to place our deep sense of gratitude to internal project guide, Mr.
K.NAGARJUNA, B.Tech for his constant motivation and valuable help through the project
work.

We consider it as a privilege to express our gratitude to Prof. A.DAVEEDU RAJU,


M.Tech, M.Phil(Ph.D), Head of the Department, Department of Information Technology for
his valuable suggestions that helped in the successful completion of project work.
. We record our sincere thanks to external guide Mr.Prasan kumar, JoInfoLogix
Software Technologies, Visakhapatnam for his constant motivation and valuable help
through the project work.
Finally I would like to thank my friends for their cooperation to complete this project.

A.RAMADEVI (07991A1288)
CH.SRIKANTH (07991A1268)
E.B SANTOSH (07991A1273)
M.RAMESH (07991A12C9)
DECLARATION

We here declare that the work done on the desertion entitled “WEB HOSTING
SERVICES” has been carried by us and submitted in partial fulfillment of the curriculum for the
award of degree of Bachelor of Technology in Information Technology to Jawaharlal Nehru
Technological University.

The various contents incorporated in this document have not been submitted for the award
of any other degree of any other institution/university

A.RAMADEVI (07991A1288)
CH.SRIKANTH (07991A1268)
E.B SANTOSH (07991A1273)
M.RAMESH (07991A12C9)
CONTENTS
1.INTRODUCTION
1.1 About the project
2.SOFTWARE REQUIREMENTS & ANALYSIS
2.1 Requirement specification
2.2 performance requirements
2.3 project initiation
2.3.1 Formulation of goals
2.3.2 Informatory goals
2.3.3 functional goals
2.4 Software and hardware requirements
2.4.1 software requirements
2.4.2 Hardware requirements
3.PROJECT DESIGN AND IMPLEMENTATION
3.1 RAD model
3.1.1 Reliable systems
3.1.2 maintenance
3.2 Data flow diagrams
3.2.1 Constructing a DFD
3.2.2 Salient features of DFD
3.2.3 Types of data flow diagrams
3.3 UML Diagrams
3.4 Data design
3.4.1 First normal form
3.4.2 Second normal form
3.5 Interface design
4.CODING AND UNIT TESTING
4.1 Selection of specific software
4.1.1 Introduction to java
4.1.2 Java data base connectivity
4.1.3 Database design
4.2 Sample code
5.SCREENS SHOTS

6.TESTING
6.1 Content testing
6.2 Database testing
6.3 Compatibility testing
7.CONCLUSION
8.REFERENCES
INTRODUCTION

1.1 ABOUT THE PROJECT:

This project is developed to generate Web Pages dynamically according to


the client requirements and has been undertaken in a professional manner which can be
used as a live software package.

The system is developed “Web Hosting Service” for various activities like
identifying the user, provision to opt for addition of new Web Page or delete a Web Page
or modify a Web Page, to provide layouts for the Web Page and Templates of the Web
Page whenever the user wants to add a new Web Page, showing the placement of the
contents, image etc. and also the templates shows the format of the Web Pages. It is also
having an option to search for any page and the user can modify his/her details. The
system provides few templates, which will decide the format of the page i.e. where an
image is placed, where logo is placed etc. When the user selects any templates,
automatically it has to design a page according to the selected template. The
administrator is responsible to add templates.
WEB HOSTING SERVICES contains two main modules.
• Admin
• Customer
2. SOFTWARE REQUIREMENTS & ANALYSIS

2.1 REQUIREMENT SPECIFICATION:

The software, ‘QUERYREDRESSAL SYSTEM’ is designed for management


of the content over a site.

INTRODUCTION

Purpose: The main purpose for preparing this document is to give a general insight
into the analysis and requirements of the existing system or situation and for
determining the operating characteristics of the system.

Scope: This Document plays a vital role in the development life cycle (SDLC)As it
describes the complete requirement of the system. It is meant for use by the
developers and will be the basic during testing phase. Any changes made to the
requirements in the future will have to go through formal change approval process.

Developers Responsibilities Overview:

The developer is responsible for:

1) Developing the system, which meets the SRS and solving all the requirements of
the system?
2) Demonstrating the system and installing the system at client's location after the
acceptance testing is successful.
3) Submitting the required user manual describing the system interfaces to work on it
and also the documents of the system.
4) Conducting any user training that might be needed for using the system.
5) Maintaining the system for a period of one year after installation.
Functional Requirements:

OUTPUT DESIGN

Outputs from computer systems are required primarily to communicate


the results of processing to users. They are also used to provides a permanent copy of
the results for later consultation. The various types of outputs in general are:

• External Outputs, whose destination is outside the organization.


• Internal Outputs whose destination is with in organization and they are the
• user’s main interface with the computer.
• Operational outputs whose use is purely with in the computer department.
• Interface outputs, which involve the user in communicating directly with

Output Definition
The outputs should be defined in terms of the following points:

 Type of the output


 Content of the output
 Format of the output Location of the output
 Frequency of the output
 Volume of the output
 Sequence of the output
It is not always desirable to print or display data as it is held on a
computer. It should be decided as which form of the output is the most suitable. For
Example:
Will decimal points need to be inserted should leading zeros be suppressed.
Output Media:

In the next stage it is to be decided that which medium is the most appropriate for the
output. The main considerations when deciding about the output media are:

• The suitability for the device to the particular application.


• The need for a hard copy.
• The response time required.
• The location of the users
• The software and hardware available.
• The cost.

Keeping in view the above description the project is to have outputs


mainly coming under the category of internal outputs. The main outputs desired
according to the requirement specification are:
The outputs were needed to be generated as a hot copy and as well as queries to be
viewed on the screen. Keeping in view these outputs, the format for the output is
taken from the outputs, which are currently being obtained after manual processing.
The standard printer is to be used as output media for hard copies.

INPUT DESIGN

Input design is a part of overall system design. The main objective during the
input designs is as given below:
• To produce a cost-effective method of input.
• To achieve the highest possible level of accuracy.
• To ensure that the input is acceptable and understood by the user.
INPUT STAGES:
The main input stages can be listed as below:
• Data recording
• Data transcription
• Data conversion
• Data verification
• Data control
• Data transmission
• Data validation
• Data correction
INPUT TYPES:
It is necessary to determine the various types of inputs. Inputs can be
categorized as follows:
• External inputs, which are prime inputs for the system.
• Internal inputs, which are user communications with the system.
• Operational, which are computer department’s communications to the
system?
• Interactive, which are inputs entered during a dialogue.

INPUT MEDIA:
At this stage choice has to be made about the input media. To conclude about the
input media consideration has to be given to;
• Type of input
• Flexibility of format
• Speed
• Accuracy
• Verification methods
• Rejection rates
• Ease of correction
• Storage and handling requirements
• Security
• Easy to use
• Portability
Keeping in view the above description of the input types and input media, it can be
said that most of the inputs are of the form of internal and interactive. As
Input data is to be the directly keyed in by the user, the keyboard can be considered to
be the most suitable input device.
ERROR AVOIDANCE
At this stage care is to be taken to ensure that input data remains accurate form
the stage at which it is recorded up to the stage in which the data is accepted by the
system. This can be achieved only by means of careful control each time the data is
handled.
ERROR DETECTION
Even though every effort is make to avoid the occurrence of errors, still a
small proportion of errors is always likely to occur, these types of errors can be
discovered by using validations to check the input data.

DATA VALIDATION
Procedures are designed to detect errors in data at a lower level of detail. Data
validations have been included in the system in almost every area where there is a
possibility for the user to commit errors.
The system will not accept invalid data. Whenever an invalid data is keyed
in, the system immediately promts the user and the user has to again key in the data
and the system will accept the data only if the data is correct. Validations have been
included where necessary. The system is designed to be a user friendly one. In other
words the system has been designed to communicate effectively with the user. The
system has been designed with pop up menus.
USERINTERGFACE DESIGN
It is essential to consult the system users and discuss their needs while
designing the user interface:
USER INTERFACE SYSTEMS CAN BE BROADLY CLASIFIED AS:
1. User initiated interface the user is in charge, controlling the progress of the
user/computer dialogue. In the computer-initiated interface, the computer
selects the next stage in the interaction.
2. Computer initiated interfaces
.USER_INITIATED INTERGFACES
User initiated interfaces fall into tow approximate classes:
1. Command driven interfaces: In this type of interface the user inputs
commands or queries which are interpreted by the computer.
2. Forms oriented interface: The user calls up an image of the form to
his/her screen and fills in the form. The forms oriented interface is
chosen because it is the best choice.

COMPUTER-INITIATED INTERFACES
The following computer – initiated interfaces were used:

1. The menu system for the user is presented with a list of alternatives
and the user chooses one; of alternatives.
2. Questions – answer type dialog system where the computer asks
question and takes action based on the basis of the users reply.

Right from the start the system is going to be menu driven, the opening menu displays
the available options. Choosing one option gives another popup menu with more
options. In this way every option leads the users to data entry form where the user
can key in the data.

ERROR MESSAGE DESIGN:


The design of error messages is an important part of the user interface design.
As user is bound to commit some errors or other while designing a system the system
should be designed to be helpful by providing the user with information regarding the
error he/she has committed. This application must be able to produce output at
different modules for different inputs.
2.2 Performance Requirements:

Performance is measured in terms of the output provided by the application.


Requirement specification plays an important part in the analysis of a system. Only
when the requirement specifications are properly given, it is possible to design a
system, which will fit into required environment. It rests largely in the part of the
users of the existing system to give the requirement specifications because they are
the people who finally use the system.
This is because the requirements have to be known during the initial stages
so that the system can be designed according to those requirements. It is very difficult
to change the system once it has been designed and on the other hand designing a
system, which does not cater to the requirements of the user, is of no use.
The requirement specification for any system can be broadly stated as given
below:

• The system should be able to interface with the existing system


• The system should be accurate
• The system should be better than the existing system
The existing system is completely dependent on the staff to perform all the duties.

2.3 PROJECT INITIATION:

In this phase, we perform the preliminary investigation procedures like setting


up project goals, gathering requirements from client etc., this phase consists of two
sub-phases as follows.

2.3.1 Formulation of Goals:

In this step, we formulate the goals to be achieved in the new system. As the
applications are web-based, the goals can be categorized into two types like
informatory goals and functional goals.

Formulation of web-based systems and applications represents a sequence of


web engineering actions like identification of business needs, description of
objectives, definition of major features and functions etc.,

2.3.2 Informatory Goals:

Informatory goals speak about what kind of information must be served by the
application. This application should fulfill the following informatory goals.

• This application should provide complete information about the several loans
and payment details.

• This application should provide complete information about the several


employees who working in the organization which issues loans to customers.

• This application should provide complete information about customers who


apply for the loans and their documents which are submitted for security.
2.3.3 Functional Goals:

Functional goals speak about what kind of services or functionalities must be


provided by the application to the different categories of users.

All registered users to the web-application should have a proper login facility with
password.

• The employees and users can register to the organization using the registration
forms.

• The administrator should have a facility to view a list of employees details,


customer details, loan details, and payment details.

• The administrator or manager should have the facility to add loan details ,
payment details, modify the loan details, observing the day to day and month
to month transactions, and also sanction loans to customers.

. 2.4 SOFTWARE AND HARDWARE REQUIREMENTS:

2.4.1 Software requirements:

Operating System : MS – Windows server 2003/XP/NT

Languages : Java (J2EE), Java Script, Html

Database System : Oracle 10g

Web Server : Tomcat 6.0

Documentation Tool : MS - Word 2003

2.4.2 Hardware requirements:

Processor : Standard processor with a speed of 2.4


GHz

RAM : 512 MB RAM

Hard Disk : 80 GB

Monitor : Standard color monitor

Keyboard : Standard keyboard

Mouse : Standard mouse


3. PROJECT DESIGN AND IMPLEMENTATION

3.1 SOFTWARE ENGINEERING PARADIGM APPLIED-


(RAD-MODEL):
The two design objectives continuously sought by developers are reliability
and maintenance.

3.1.1 Reliable system:

There are two levels of reliability. The first is meeting the right requirements.
A careful and through systems study is needed to satisfy this aspect of reliability. The
second level of systems reliability involves the actual working delivered to the user.
At this level, the systems reliability is interwoven with software engineering and
development. There are three approaches to reliability.

1. Error avoidance: Prevents errors from occurring in software.

2. Error detection and correction: In this approach errors are recognized whenever
they are encountered and correcting the error by effect of error, of the system does
not fail.

3. Error tolerance: In this approach errors are recognized whenever they occur, but
enables the system to keep running through degraded perform or by applying
values that instruct the system to continue process.

3.1.2 Maintenance: The key to reducing need for maintenance, while working, if
possible to do essential tasks.

1. More accurately defining user requirement during system development.

2. Assembling better systems documentation.

3. Using more effective methods for designing, processing, login and


communicating information with project team members.

4. Making better use of existing tools and techniques.

5. Managing system engineering process effectively.


3.2 DATA FLOW DIAGRAM:
A data flow diagram is graphical tool used to describe and analyze movement
of data through a system. These are the central tool and the basis from which the
other components are developed. The transformation of data from input to output,
through processed, may be described logically and independently of physical
components associated with the system. These are known as the logical data flow
diagrams. .A DFD is also known as a “bubble Chart” has the purpose of clarifying
system requirements and identifying major transformations that will become
programs in system design. So it is the starting point of the design to the lowest level
of detail. A DFD consists of a series of bubbles joined by data flows in the system.

3.2.1 Constructing a DFD:

Several rules of thumb are used in drawing DFD’s:

1. Process should be named and numbered for an easy reference. Each name should
be representative of the process.

2. The direction of flow is from top to bottom and from left to right. Data
traditionally flow from source to the destination although they may flow back to
the source. One way to indicate this is to draw long flow line back to a source.
An alternative way is to repeat the source symbol as a destination. Since it is used
more than once in the DFD it is marked with a short diagonal.

3. When a process is exploded into lower level details, they are numbered.

4. The names of data stores and destinations are written in capital letters. Process and
dataflow names have the first letter of each work capitalized

3.2.2 Salient features of DFD’s:

1. The DFD shows flow of data, not of control loops and decision are controlled
considerations do not appear on a DFD.

2. The DFD does not indicate the time factor involved in any process whether the
data flows take place daily, weekly, monthly or yearly.

3. The sequence of events is not brought out on the DFD.

3.2.3 Types of data flow diagrams:

1. Current Physical
2. Current Logical

3. New Logical

4. New Physical

3.3 UML DIAGRAMS:The Unified Modeling Language allows the software


engineer to express an analysis model using the modeling notation that is governed by
a set of syntactic semantic and pragmatic rules.

A UML system is represented using five different views that describe the
system from distinctly different perspective. Each view is defined by a set of diagram,
which is as follows.

• User Model View

. This view represents the system from the users perspective.

The analysis representation describes a usage scenario from the


. end-users perspective.

• Structural model view

In this model the data and functionality are arrived from inside the
system.

This model view models the static structures.

• Behavioral Model View

It represents the dynamic of behavioral as parts of the system,


depicting the interactions of collection between various structural
elements described in the user model and structural model view.

• Implementation Model View

In this the structural and behavioral as parts of the system are


represented as they are to be built.

• Environmental Model View

In this the structural and behavioral aspects of the environment


in which the system is to be implemented are represented.
Class Diagram
Use case Diagram
Sequence Diagram for Customer

Sequence Diagram for Administrator


3.4 DATA DESIGN:

Data dictionary is a document, which describes the database design of the


project. In this step, we generate the data dictionary using the E-R Model of the
system. Each entity is represented as a table here. The Data dictionary describes the
tables, their fields, data types and constraints on the fields. The Data Design
transforms the information domain model created during analysis into the data
structure that will be required to implement the software.

Data Design is the first of three design activities that are conducted during
software engineering. The impact of data structure on program structures and
procedural complexity cases data design to have a profound influence on software
quality. The concept of information hiding and data abstraction provides the
foundation for an approach to data design. The primary activity during data design is
to select logical representation of data objects (data dictionary) identified during the
requirements definitions and specifications phase.

3.4.1 First normal form:


A relation R of this system is said to be in first normal form, if all domains
contain atomic values.
In this project the Data in each table has atomic values but the data are
redundant. so, I consider next normal form i.e., Second normal form.

3.4.2 Second normal form:


A relation R of this system is in second normal form as if every irreducibly
dependent on primary key. Coming to child tables we will be having a reference to the
primary key of master table.
In this project I normalized the data tables up to second normal form.
DATABASE TABLES

create table cust_req_details:


cust_id cust_name cust_address contact_no email_id type_sid
1 prasan

create table cust_domain_reg:


domain_id cust_id domain_name Serve Todatabase ser_st_date
r

create table customer_login:


login_id Pwd cust_id cust_reg_date

create table membership_fee:


cust_id type_sid amt number paid_date no

create table admin_master:


admin_id admin_pwd Company Address contact_no email_id

create table domain_feedback:


domain_id cust_id domain_feedback
3.5 INTERFACE DESIGN:

In this step, we design all the interfaces for the application. Interface is the
medium between the user and the system. We consider all the client specifications
while designing the screens and reports. Every user interface has been designed so
that the system provides all the characteristics like easy to use, less number of
keystrokes to complete an action, less usage of left hand, easy too learn, easy to
navigate, consistent, error-free and functional. The entire interface that has designed
with the features listed below:

• Every action is provided with a prompting message. So that it provides a


better communication.

• Every interface maintained consistent navigation, menus, icons, colors, shape


and layout.

Every page has been designed so that it optimizes the user’s work efficiency.
4.CODING AND UNIT TESTING
4.1 Selection of specific software
4.1.1 Introduction to java:

Initially the language was called as “oak” but it was renamed as “Java” in
1995. The primary motivation of this language was the need for a platform-
independent (i.e., architecture neutral) language that could be used to create software
to be embedded in various consumer electronic devices.
 Java is a programmer’s language.

 Java is cohesive and consistent.

 Except for those constraints imposed by the Internet environment, Java

gives the programmer, full control.

 Finally, Java is to Internet programming where C was to system

programming.

JAVA VIRTUAL MACHINE (JVM):


Beyond the language, there is the Java virtual machine. The Java virtual
machine is an important element of the Java technology. The virtual machine can be
embedded within a web browser or an operating system. Once a piece of Java code is
loaded onto a machine, it is verified. As part of the loading process, a class loader is
invoked and does byte code verification makes sure that the code that’s has been
generated by the compiler will not corrupt the machine that it’s loaded on. Byte code
verification takes place at the end of the compilation process to make sure that is all
accurate and correct. So byte code verification is integral to the compiling and
executing of Java code.

Java Java byte code


JavaV
Source M
Java .Class

Picture showing the development process of JAVA Program


Java programming uses to produce byte codes and executes them. The first
box indicates that the Java source code is located in a. Java file that is processed with
a Java compiler called javac. The Java compiler produces a file called a. class file,
which contains the byte code. The .class file is then loaded across the network or
loaded locally on your machine into the execution environment is the Java virtual
machine, which interprets and executes the byte code.
JAVA ARCHITECTURE:
Java architecture provides a portable, robust, high performing environment
for development. Java provides portability by compiling the byte codes for the Java
Virtual Machine, which is then interpreted on each platform by the run-time
environment. Java is a dynamic system, able to load code when needed from a
machine in the same room or across the planet.
Compilation of code:
When you compile the code, the Java compiler creates machine code (called
byte code) for a hypothetical machine called Java Virtual Machine (JVM). The JVM
is supposed to execute the byte code. The JVM is created for overcoming the issue of
portability. The code is written and compiled for one machine and interpreted on all
machines. This machine is called Java Virtual Machine.
JAVA SERVER PAGE (JSP):
Java Server Pages is a simple, yet powerful technology for creating and
maintaining dynamic-content web pages. Based on the Java programming language,
Java Server Pages offers proven portability, open standards, and a mature re-usable
component model.
PORTABILITY:
Java Server Pages files can be run on any web server or web-enabled
application server that provides support for them. Dubbed the JSP engine, this
support involves recognition, translation and management of the Java Server Pages
lifecycle and its interaction with associated components.
COMPOSITION:
It was mentioned earlier that the Java Server Pages architecture could include
reusable Java components. The architecture also allows for the embedding of a
scripting language directly into the Java Server Pages file. The components current
supported include Java Beans and Serves. As the default scripting language, Java
Server Pages use the Java Programming language. This means that scripting on the
server side can take advantage of the full set of capabilities that the Java
programming language offers.
PROCESSING:
A Java Server Pages file is essentially an HTML document with JSP
scripting or tags. It may have associated components in the form of class, .jar, or .ser
files- -or it may not. The use of components is not required.

The Java Server Pages file has a .jsp extension to identify it to the server as a
Java Server Pages file. Before the page is served, the Java Server Pages syntax is
parsed and processed into a servlet on the server side. The servlet that is generated,
outputs real content in straight HTML for responding to the customer. Because it is
standard HTML, the dynamically generated response looks no different to the
customer browser than a static response.
ACCESS MODELS:
A Java Server Pages file may be accessed in at least two different ways: A
client request comes directly into a Java Server Page.

Bean
Request

Browser Response
JSP

Figure 2.1 - Client request comes directly into java server pages

In this scenario, suppose the page accessed reusable Java Bean components
that perform particular well-defined computations like accessing a database. The
result of the Bean’s computations, called result sets is stored within the Bean as
properties. The page uses such Beans to generate dynamic content and present it back
to the client. A request comes through a servlet.

SERVLET

JDBC

Bean
Result Database
Browser Bean
Request

Response
Figure 2.2 – A request
JSP comes through servlet

The servlet generates the dynamic content. To handle the response to the
client, the servlet creates a Bean and stores the dynamic content (sometimes called the
result set) in the Bean. The servlet then invokes a Java Server Page that will present
the content along with the Bean containing the generated from the servlet.

There are two APIs to support this model of request processing using Java
Server Pages. One API facilitates passing context between the invoking servlet and
the Java Server Page. The other API lets the invoking servlet specify which Java
Server Page to use.

In both of the above cases, the page could also contain any valid Java code.
The Java Server Pages architecture separation of content from presentation- -it does
not mandate it.
4.1.2 JAVA DATABASE CONNECTIVITY(JDBC):

JDBC requires that the SQL statements be passed as Strings to Java


methods. For example, our application might present a menu of database tasks from
which to choose. After a task is selected, the application presents prompts and blanks
for filling information needed to carry out the selected task. With the requested input
typed in, the application then automatically invokes the necessary commands.
In this project we have implemented three-tier model, commands are
sent to a “middle tier” of services, which then send SQL statements to the database.
The database process the SQL statements and sends the results back to the middle
tier, which then sends them to the user. JDBC is important to allow database access
from a Java middle tier.
JDBC is a Java API for executing SQL statements. (As a point of
interest, JDBC is a trademarked name and is not an acronym; nevertheless, JDBC is
often thought of as standing for "Java Database Connectivity".) It consists of a set of
classes and interfaces written in the Java programming language. JDBC provides a
standard API for tool/database developers and makes it possible to write database
applications using a pure Java API.
JDBC has four bridge drivers.They are as follows.
Type-1 JDBC-ODBC Bridge Driver
 It is used only in the stand alone application and non portable i.e. used

in the machine.

 It does not support the Internet and Intranet database application access.

 It provides the bridge between the JDBC API and ODBC API. The

bridge translates the standard JDBC calls to corresponding ODBC calls,

and send them to ODBC data source via ODBC libraries.

Driver name: “sun.jdbc.odbc.JdbcOdbcDriver”

Type-2 Part Java, Part Native Driver

 It has the same properties as type-1.


 Implementations are available in .lib files (library).

 This is platform Dependent.

 Type -2 drivers are more efficient than the type-1 drivers.

 Driver name: “oracle.jdbc.Driver.OracleDriver”

Type-3 Intermediate Database Access Server

 Type-3 drivers use an intermediate (Middleware) database server that

has the ability to connect multiple java clients to multiple database

servers.

 It is used for the Intranet access but not Internet access.

 It is platform Independent.

 To use this driver Web server is necessary one.

Driver name: “oracle.jdbc.Driver.OracleDriver”

Type-4 Pure Java Drivers

 Type-4 drivers are pure java alternate to Type-2 drivers.

 It uses the thin layer of Network.

 It passes the query through network and can be used for internet access.

 It has an access to Internet.

Driver name:”oracle.jdbc.Driver.OracleDriver”

A list of available all JDBC drivers, is available


“http://industry.java.sun.com/products/jdbc/driviers/.
DRIVER MANAGER:
The Driver Manager class is the management layer of JDBC, working
between the user and the drivers. It keeps track of the drivers that are available and
handles establishing a connection between a database and the appropriate driver. It
addition, the driver manager class attends to things like driver login time limits
and the printing of log and tracing messages. The only method in this class that a
general programmer needs to use directly is DriverManager.getConnection. As its
name implies, this method establishes a connection to a database.

A JAVA2 Platform, Enterprise Edition Deployment


1.2. Acquiring a reference to a home object

4.1.3 Database Design:


A database is a corporate collection of data with some inherent meaning,
designed, built and populated with data for a specific purpose. A database stores data
that is useful to us. This data is only a part of the entire data available in the world
around us.

To be able to successfully design and maintain databases we have to do


the following:

 Identify which part of the world’s data is of interest to us.


 Identify what specific objects in that part of the world’s data are of

interest to us.

 Identify a relationship between the objects. Hence the objects, their

attributes and the relationship between them that are of interest to us are

still owed in the database that is designed, built and populated with data

for a specific purpose.

RELATIONAL DATABASE MANAGEMENT:


A relational database management system uses only its relational capabilities
to manage the information stored in its databases.
INFORMATION REPRESENTATION:
All information stored in a relational database is represented only by data
item values, which are stored in the tables that make up the database. Associations
between data items are not logically represented in any other way, such as the use of
pointers from one table to the other.
LOGICAL ACCESSIBILITY:
Every data item value stored in relational database is accessible by stating
the nature of the table it is stored in, the name of the column under which it is stored
and the value of the primary key that defines the row in which it is stored.
CATALOGUE FACILITIES:
The logical description of the relation database is represented in the same
manner as ordinary data. This is done so that the facilities of the relation database
management system itself can be used to maintain database description.
DATA LANGUAGE:
The relational database management system may support many types of
languages for describing data and accessing the database. However, there must be at
least one language that uses ordinary character strings to support the definition of
data, the definition of views, the manipulation of data, constraints on data integrity,
information concerning authorization and the boundaries for recovery of units.
VIEW UPDATABILITY:
Any view that can be defined using combination of basic tables, that are
theoretically updateable, these capital of being updated by the relational database
management system.
INSERT, UPDATE AND DELETE:
Any operand that describes the results of a single retrieval operation is capable of
being applied to an insert update or delete operation as well.
PHYSICAL DATA INDEPENDENCE:
Changes made to physical storage representation or access methods do not
require changes to be made to application programmers.
LOGICAL DATA INDEPENDENCE:
Changes made to tables, that do not modify any data stored in that table, do
not require changes to be made to application programmers.
INTEGRITY CONSTRAINTS:
Constraints that apply to entity integrity and referential integrity are
specifiable by the data language implemented by the database management system
and not by the statements coded into the application program.
DATABASE DISTRIBUTION:
The data language implemented by the relation database management system
supports the ability to distribute the database without requiring changes to be made to
application programmers. This facility must be provided in the data language, whether
or not the database management system itself supports distributed databases.
HYPERTEXT MARKUP LANGUAGE (HTML)

Hyper Text Markup Language the language of the web page. World Wide
Web better known as www, HTML allows the user to produce those WebPages. It
includes the text, graphics and pointers to other web pages.
HTML is not a programming language but it is an application of ISO
standard 8879, SGML (Standard Generalized Markup Language), but specialized to
Hypertext and adapted to the web. The idea behind Hypertext is that instead of
reading text is rigid linear structure it can easily jump from one web page to another
web page. We can navigate through the information based on our interest and
preference. A mark up language simply a series of elements, each delimited with
special characters that define how text are other items enclosed with in the element
should be displayed. Hyperlinks are underlined are emphasized words that load to
other documents some portions of the same documents.
JAVA SCRIPT

Netscape Communication Corp, developed Java Scripts the makers of


Netscape Navigator Web browser, in the year 1995. Java script was the first web
programming language to be introduced and it is by far the most popular.
Java script was originally called Live Script and renamed as the
JavaScript to indicate its relationship with java. JavaScript supports the development
of both client and server Components of Web based applications. Even though
JavaScript supports both client and server Web programming, we prefer JavaScript at
client side programming since most of the browsers supports it. JavaScript is almost
as easy to learn as HTML, and JavaScript statements can be included in HTML
documents by enclosing the statement between
<SCRIPT>………. </SCRIPT> tags pair.
<SCRIPT LANGUAGE=” JavaScript”>
JavaScript statements </SCRIPT>

In JavaScript we can:

 Add scrolling or changing messages to the browser’s status line.

 Validate the contents of the form and make calculation.

 Animate images or rotate images that change when we move the mouse

over them.

 Detect the browser in use and display different content for different

browsers.
4.2 Sample Code:

Admin register code:

import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import CMST.*;

public class AdminRegister extends HttpServlet


{

public void init(ServletConfig config) throws ServletException


{
super.init(config);
}

public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{

RequestDispatcher rd=request.getRequestDispatcher("Inserted.jsp");

response.setContentType("text/html");

String aid=request.getParameter("aid");
String apwd=request.getParameter("apwd");
String cmp=request.getParameter("cmp");
String AdminAdd=request.getParameter("AdminAdd");
String cno=request.getParameter("cno");
String EmailId=request.getParameter("EmailId");
System.out.println(EmailId);
try
{

ConnectionBean CBean=new ConnectionBean();

int inserted=CBean.executeUpdate("insert into admin_master


values('" + aid + "','" + apwd + "','" + cmp + "','" + AdminAdd +
"','" + cno + "','" + EmailId + "') ");

if(inserted==1)
{
rd.forward(request, response);
}

}catch(Exception ex)
{

System.out.println("Error"+ ex);
}

Admin login code:

import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import CMST.*;

public class AdminLogin extends HttpServlet


{

public void init(ServletConfig config) throws ServletException


{
super.init(config);
}

public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{
RequestDispatcher rd=null;
response.setContentType("text/html");

try
{
ConnectionBean CBean=new ConnectionBean();
Connection con=CBean.getConnection();
String loginName=request.getParameter("aLid");
String adminPwd=request.getParameter("aPwd");
ResultSet adminrs_found=CBean.executeQuery("select *
from admin_master where admin_id='" + loginName + "' and admin_pwd='"
+ adminPwd + "' ");
System.out.println("INSIDE ADMIN
LOGIN..............."+ adminrs_found);

if(adminrs_found.next())
{

rd=request.getRequestDispatcher("AdminHome.html");
}
else
{
rd=request.getRequestDispatcher("Login.jsp");
}
rd.forward(request, response);
}
catch(Exception ex)
{
System.out.println("Error"+ ex);
ex.printStackTrace();
}
}
}
Customer register code:

import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import CMST.*;

public class CustRegister extends HttpServlet


{
public void init(ServletConfig config) throws ServletException
{
super.init(config);
}
public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{
RequestDispatcher
rd=request.getRequestDispatcher("Inserted.jsp");
RequestDispatcher
rd1=request.getRequestDispatcher("Error.jsp");
response.setContentType("text/html");

String cregno=request.getParameter("regno");
String CustName=request.getParameter("CustName");
String CustAdd=request.getParameter("CustAdd");
String CustCno=request.getParameter("CustCno");
String EmailId=request.getParameter("EmailId");
String stype=request.getParameter("stype");

try
{
ConnectionBean CBean=new ConnectionBean();
int inserted=CBean.executeUpdate("insert into
cust_req_details values(" + cregno + ",'" + CustName + "','" +
CustAdd + "','" + CustCno + "','" + EmailId + "'," + stype + ") ");
if(inserted==1)
{
rd.forward(request, response);
}else
{
rd1.forward(request, response);
}
}
catch(Exception ex)
{
System.out.println("erro" + ex);
}
}
}
Customer login code:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import CMST.*;

public class CustomerLogin extends HttpServlet


{

public void init(ServletConfig config) throws ServletException


{
super.init(config);
}

public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{
RequestDispatcher rd=null;
response.setContentType("text/html");
try
{

ConnectionBean CBean=new ConnectionBean();


Connection con=CBean.getConnection();
String loginName=request.getParameter("cLid");
String cPwd=request.getParameter("cPwd");
ResultSet custrs_found=CBean.executeQuery("select cust_id from
customer_login where login_id='" + loginName + "' and pwd='" + cPwd +
"' ");
if(custrs_found.next())
{
System.out.println("in valid");

String cid=custrs_found.getString(1);

request.setAttribute("cid",cid);

rd=request.getRequestDispatcher("AboutDomain.jsp");
}else
{
rd=request.getRequestDispatcher("CustLogin.jsp");
}

rd.forward(request, response);
}catch(Exception ex)
{

System.out.println("Error"+ ex);
}

}
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import CMST.*;

public class CheckUser extends GenericServlet


{
public void service(ServletRequest request,ServletResponse
response) throws ServletException, IOException
{
try
{

response.setContentType("text/html");
PrintWriter out = response.getWriter();
String username = request.getParameter("user");
System.out.println(username);
Connection con=null;
ConnectionBean CBean=new ConnectionBean();
con=CBean.getConnection();

ResultSet rs = CBean.executeQuery("Select * from


customer_login where login_id= '" + username + "' ");

if (rs.next())
{
out.println("already exists");
}else
{
out.println("You Can Use This User Id");
}

}
catch(Exception e)
{ System.out.println("error"+e.getMessage());}
}

import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import CMST.*;

public class LoginCheck extends HttpServlet


{

public void init(ServletConfig config) throws ServletException


{
super.init(config);
}
public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{

RequestDispatcher rd=null;
response.setContentType("text/html");
try
{
System.out.println("in logincheck");

ConnectionBean CBean=new ConnectionBean();


Connection con=CBean.getConnection();
ResultSet adminrs_found=CBean.executeQuery("select * from
admin_master");

if(adminrs_found.next())
{
rd=request.getRequestDispatcher("Login.jsp");
}else
{
rd=request.getRequestDispatcher("AdminRegistrationForm.jsp");

}
rd.forward(request, response);

}catch(Exception ex)
{

System.out.println("Error"+ ex);

package CMST;
import java.sql.*;

public class ConnectionBean


{
private Connection connection;
private Statement statement;
private static final String
driver="sun.jdbc.odbc.JdbcOdbcDriver";
private static final String dbURL="jdbc:odbc:oradsn";
private static final String login="system";
private static final String password="manager";

public ConnectionBean()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection=DriverManager.getConnection("jdbc:odbc:oradsn",
"system", "manager");
// System.out.println("CONNECTION ........"+
connection);
statement=connection.createStatement();
}
catch (ClassNotFoundException e)
{
System.out.println("ConnectionBean: driver unavailable");
connection = null;
}
catch (SQLException e)
{
System.out.println("ConnectionBean: driver not
loaded");
e.printStackTrace();
connection = null;
}
}

public Connection getConnection()


{
return connection;
}

public void commit() throws SQLException


{
connection.commit();
}

public void rollback() throws SQLException


{
connection.rollback();
}

public void setAutoCommit(boolean autoCommit) throws


SQLException
{
connection.setAutoCommit(autoCommit );
}

public ResultSet executeQuery(String sql) throws SQLException


{
return statement.executeQuery(sql);
}

public int executeUpdate(String sql) throws SQLException


{
return statement.executeUpdate(sql);
}

public boolean execute(String sql) throws SQLException


{
return statement.execute(sql);
}

protected void finalize()


{
try
{
connection.close();
}
catch (SQLException e)
{
}
}

}import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import CMST.*;

public class DomainReg extends HttpServlet


{

public void init(ServletConfig config) throws ServletException


{
super.init(config);
}

public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{

RequestDispatcher
rd=request.getRequestDispatcher("CustInserted.jsp");

response.setContentType("text/html");
String dno=request.getParameter("dno");
String cid=request.getParameter("cid");
String DomainName=request.getParameter("DomainName");
String sName=request.getParameter("sName");
String DName=request.getParameter("DName");
String date=request.getParameter("date");
String ddesc=request.getParameter("ddesc");
try
{

ConnectionBean CBean=new ConnectionBean();


Connection con=CBean.getConnection();
int inserted=CBean.executeUpdate("insert into cust_domain_reg
values('" + dno + "'," + cid + ",'" + DomainName + "','" + sName +
"','" + DName + "','" + date + "','" + ddesc + "') ");
if(inserted==1)
{
rd.forward(request, response);
}

}catch(Exception ex)
{

System.out.println("Error"+ ex);
}
}
}import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import CMST.*;

public class DomainFeedback extends HttpServlet


{

public void init(ServletConfig config) throws ServletException


{
super.init(config);
}

public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{
RequestDispatcher
rd=request.getRequestDispatcher("DetailsInserted.jsp");
response.setContentType("text/html");
int inserted;

int cid=Integer.parseInt(request.getParameter("txtcid"));
System.out.println(cid + "ok");

int did=Integer.parseInt(request.getParameter("did"));
System.out.println(did + "ok1");

String feedback=request.getParameter("feedback");
try
{
ConnectionBean CBean=new ConnectionBean();
Connection con=CBean.getConnection();
ResultSet domain_rs=CBean.executeQuery("select * from
domain_feedback where domain_id= " + did + " and cust_id=" + cid + "
");

if(domain_rs.next())
{
System.out.println("in update");
inserted=CBean.executeUpdate("update domain_feedback set
domain_feedback='" + feedback + "' where domain_id= " + did + " and
cust_id=" + cid + " ");
}else
{
System.out.println("in insert");
inserted=CBean.executeUpdate("insert into domain_feedback
values(" + did + "," + cid + ",'" + feedback + "')");

System.out.println("in insert" + inserted);


if(inserted==1)
{
rd.forward(request, response);
}

}catch(Exception ex)
{
System.out.println(ex);
}

import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import CMST.*;
public class SaveServiceDetails extends HttpServlet
{

public void init(ServletConfig config) throws ServletException


{
super.init(config);
}

public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{

RequestDispatcher
rd=request.getRequestDispatcher("DetailsInserted.jsp");
response.setContentType("text/html");
String serno=request.getParameter("serno");
String servName=request.getParameter("servName");
String validity=request.getParameter("validity");
int amt=Integer.parseInt(request.getParameter("Amt"));
try
{

ConnectionBean CBean=new ConnectionBean();

Connection con=CBean.getConnection();
int inserted=CBean.executeUpdate("insert into toservice values('"
+ serno + "','" + servName + "','" + validity + "'," + amt + ") ");
if(inserted==1)
{

rd.forward(request, response);

}catch(Exception ex)
{
}

}}

import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.*;

import CMST.*;
public class UpdateServiceDetails extends HttpServlet
{

public void init(ServletConfig config) throws ServletException


{
super.init(config);
}

public void destroy() { }

protected void service(HttpServletRequest request,


HttpServletResponse response) throws ServletException,
java.io.IOException
{
PrintWriter out=response.getWriter();
//RequestDispatcher
rd=request.getRequestDispatcher("DetailsInserted.jsp");
response.setContentType("text/html");
String serno=request.getParameter("serno");
String servName=request.getParameter("servName");
String validity=request.getParameter("validity");
int amt=Integer.parseInt(request.getParameter("Amt"));

try
{
ConnectionBean CBean=new ConnectionBean();
Connection con=CBean.getConnection();
int inserted=CBean.executeUpdate("update toservice set
service_name='"+ servName + "',validity='" + validity + "',amount=" +
amt + " where type_sid="+ serno + " ");
if(inserted==1)
{
out.println("<html> <script> function check()
{ self.close(); opener.location='ViewServiceDetails.jsp'; } </script>
<center> <h1><b>Details Updated Successfully</b></h1> </center>
</html>");
out.println("<center><input type=button
value='Close' onclick='return check()'></center>");
// rd.forward(request, response);
}
else
{
System.out.println("Not Updated");
}
}
catch(Exception ex)
{
System.out.println(ex);

}
}
}
5.SCREENS SHOTS
Home page:

Customer requisition form:


Template screen:

About us screen:
Contact Us:

Service Detailsscreen:
Customer Login screen:

Customer Home:
New domain registration:

Files upload :
About Services screen:

Domain feedback:
Domain feedback form:

Admin Login screen:


Admin Home:

Customer Details page:


Membership Fee Details:

View service details:


About services screen:

Services update screen:


Service creation screen:

Domain details:
Membership details:
Feedback screen:
Logout screen:
6. TESTING

Testing

In software development, bugs could creep in at any stage during the


development. Testing is the major quality control measure employed during testing,
the program to be tested is executed with a set of test cases, and the output of the
program for the test cases is evaluated to determine if the program is performing as it
is expected to do. Testing is of two types – Dynamic testing and static testing. In
dynamic testing method the behavior of the system is observed by executing the
system. In static method the behavior of the system is not observed by executing the
system but by review, program providing and code reading. Testing process consists
of some levels.

White-box testing

White-box testing of software is predicated on close examination of


procedural detail. Providing test cases that exercise specific sets of conditions and/or
loops tests logical paths through the software

Black-box testing

Black-Box Testing alludes to tests that are conducted at the software interface.
Although they are designed to uncover errors, black-box tests are used to demonstrate
that software functions are operational, that input is properly accepted and output is
correctly produced, and that the integrity of external information is maintained. A
black-box test examines some fundamental aspect of a system with little regard for
the internal logical structure of the software.
6.1 CONTENT TESTING:

Content testing attempts to uncover errors in content of the web application. In


addition to examining static content for errors, this testing step also considers
dynamic content derived from data maintained as a part of database system that has
been integrated with the web application. Content testing of all web pages is evaluated
for syntactic and semantic errors. At syntactic level I have verified the content for
spelling, punctuation and any grammar mistakes of all pages which contain the
content of the website.

6.2 DATABASE TESTING:

Database testing is done to uncover the errors which occur as a consequence of


fetching large equities of data from the database, extracting relevant data from the
database, accessing the database using several queries etc,

6.3 COMPATIBILITY TESTS:

As this is a web application, it should run on different environments like


different computer architectures, operating systems, browsers and network connection
speeds. As different computing configurations can result in difference in client side
scripting speeds and display resolution, operating system variance may cause web
application processing issues.
7.CONCLUSION

The project has been appreciated by all the users in the organization. It is easy
to use, since it uses the GUI provided in the user dialog. User friendly screens are
provided. The usage of software increases the efficiency, decreases the effort. It has
been efficiently employed as a Site management mechanism. It has been thoroughly
tested and implemented.

8. REFERENCES

Books

Software Engineering

Roger.S. Pressman

Database System Concepts 4th edition

Silberschatz, Korth, Sudarshan

Java How to Program, sixth edition, Pearson Education/PHI, 2001

H.M.Dietel and P.J.Dietel,

Websites

www.w3schools.com

www.programmersheaven.com

www.google.com
USER MANUAL:
To run the project user has to install the tomcat. Tomcat is installed if
and only if java is already installed in the system. For data base maintanence user has
install the oracle.

How to run the project:

1.Place the project in the WEBAPPS directory of tomcat.

C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\whs.

2.Go to administrative tools in the control panel and add driver name in the data
sources as microsoft ODBC for oracle.

3. After enter the driver name user has to enter data sourse name. For this project the
data source name is oradsn.

4. Start tomcat server.

5. Type the following URL address in web bbrowser

http://localhost:7070/

6. Click on the project name displayed in the applications and run the project else
enter the following URL address in the browser to enter into home page.

http://localhost:7070/whs/AdminLogin.JSP/

7. Click the links appeared in the home page. To enter into adminstrator form click
on the administrator tag. To enter into retailer form click on the retailer tag.

You might also like