website for mtnl

Upload: deepak-verma

Post on 06-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Website for Mtnl

    1/117

    WEBSITE FOR MTNLBROADBAND SERVICES

    Page | 1

  • 8/3/2019 Website for Mtnl

    2/117

    A project submitted in partial fulfillment of

    the requirement for Mahanagar Telephone

    Nagar Limited summer training 2009

    Submitted to:

    MTNL(Mahanagar Telephone Nagar Limited)

    Sector-9,Rohini.

    Page | 2

  • 8/3/2019 Website for Mtnl

    3/117

    WEBSITE FOR MTNL

    BROADBAND SERVICES

    (A Project Report For MTNL Summer Training 2009)

    Made by:

    Chirag Kataria

    Rashi Aggarwal

    Page | 3

  • 8/3/2019 Website for Mtnl

    4/117

    INDEX

    PrefaceAcknowledgement

    Introduction

    Objectives

    Justification and need of the system

    Advantages of the project

    Platform used

    System development life cycleGantt chart

    System model

    Recognition of need

    Need Identification

    Feasibility study

    Cost-Benefit analysis

    System analysisWorking environment

    Java

    Weblogic

    Oracle

    System design

    Database design

    ER-diagram

    Form design

    Coding

    Testing

    Maintenance

    Conclusion

    Page | 4

  • 8/3/2019 Website for Mtnl

    5/117

    Future prospects

    Bibliography

    PREFACE

    The website for MTNL Broadband Services is an

    application that is maintained in order to give a moderneffective management for maintenance of broadband users

    account and giving the details of internet usage to the

    customers apart from providing other facilities like billing

    information.

    Computerization of broadband services is of great

    significance for making the complicated process of record

    maintenance as simple as possible using structured and

    modular design.

    Due to spurting of many books, the record maintenance of

    large number of customers has grown considerably.

    Though the whole work cannot be claimed to be project,

    the main purpose of this project is record maintenance and

    providing information about the number of MBs used, freeMBs, various packages available and the billing

    information etc.

    Page | 5

  • 8/3/2019 Website for Mtnl

    6/117

    ACKNOWLEDGEMENT

    The best part about completion of project are sense of

    achievement and that they offer a wonderful opportunity to

    thanks all those who are directly or indirectly associated

    with the project. This project was special it was undertaken

    as a requirements for the completion of summer training

    conducted by MTNL. Entire project development processes

    helps us grasp not just the technical details of the subject but also helped us understand the IT (Software

    Development) world and how people work here.

    We consider ourselves fortunate enough to be in right

    place with right person. We are very much obliged to our

    guide Mr. Vijay and _______ for their diligent support and

    invaluable guidance. We take this opportunity to express

    our deep sense of gratitude and hearty thank to the staff ofMTNL for their valuable guidance, kind suggestion and

    constant encouragement.

    Page | 6

  • 8/3/2019 Website for Mtnl

    7/117

    Chirag Kataria

    Rashi Aggarwal

    INTRODUCTION

    The World-Wide Web (WWW) continues to grow at an astonishing rate.

    For a telecom company it is very important to be in touch with the customer

    and provide them a sense of care. Today almost every home in urban India is

    having a broadband connection. Various telecom companies are emerging at

    a fast pace with lucrative schemes. To come up and win the race with flying

    colours needs something extra. For this a company should treat its customers

    with timely offers, new packages etc. Above all, the services should be

    transparent. For example, a broadband company should tell the customers

    how much MBs they have used during each session. Apart from this, it

    should provide billing information so that if a customer havent received a

    months bill then he could check it from his account. This will save the

    customers time in going to MTNL office to check his bill and above all the

    tension to remember whether the months bill has arrived or not, whether he

    has paid it or not. He should be able to see which of his bills are fully paid,

    partially paid or unpaid.

    Page | 7

  • 8/3/2019 Website for Mtnl

    8/117

    In this project we are considering three types of users.

    Administrator is the person who will have all the controls under him. He

    can add, delete, update the record of a employee in the database. He can also

    do the addition, deletion and updation in the records of a customer. He will

    be the master of the website who can provide passwords to employees. He

    can view the lists like area wise customers, bill amount wise customers etc.

    Employee/User is the MTNL staff who can do the addition and deletion in

    the records of a customer apart from doing various updations. They can also

    see the lists like area wise customers, bill amount wise customers, status of

    bill etc.

    Customer will be the person who is having the broadband connection. He

    will have the facility to check his bill information, do see the various

    packages available, to change his password for security reasons, to see his

    internet usage and the no. of MBs left if he is having a package providing

    free MBs.

    Page | 8

  • 8/3/2019 Website for Mtnl

    9/117

    ADVANTAGES OF THE PROJECT

    Computerization makes the work of staff as well as customer

    easier, faster and manageable. Automation of any systemmakes it more reliable and efficient. Staff will not have to

    waste their time in doing so much paper work. Customers

    will now not have to wait to get their records made and

    updated by hands, which takes a lot of time. Thus time spend

    by a customer to get its work done is reduced. Also, the

    waiting time to get their records made and updated is reduce

    significantly.

    It is going to be advantageous for telecom company

    because they will have to pay half or even fewer employees

    as the most of the work will be taken over by the computer.

    Page | 9

  • 8/3/2019 Website for Mtnl

    10/117

    PLATFORM USED

    Hardware Requirement

    1. Intel Core 2 Duo Processor

    2. Color Monitor

    3. Keyboard

    4. 160 GB Hard Disk

    5. 2 GB RAM

    6. Compact Disk Drive

    Software Requirement

    1. Windows 9x

    2. BEA Weblogic Platform 8.1

    3. Oracle 9i

    4. Notepad

    5. Java Development kit

    Front End Used

    Java

    Back End Used

    Oracle 9i

    Page | 10

  • 8/3/2019 Website for Mtnl

    11/117

    SYSTEM DEVELOPMENT LIFE

    CYCLE

    The Systems Development Life Cycle (SDLC) is a

    conceptual model used in project management that

    describes the stages involved in an information system

    development project from an initial feasibility study

    through maintenance of the completed application.

    Various phases involved in development:

    Recognition of need/Preliminary Investigation

    Feasibility Study

    System Analysis

    System Design

    Development of software

    System testing

    Implementation and Evaluation

    Maintenance

    Page | 11

    http://h/System%20Development%20Life%20Cycle.htmhttp://h/System%20Development%20Life%20Cycle.htmhttp://h/System%20Development%20Life%20Cycle.htmhttp://h/System%20Development%20Life%20Cycle.htm
  • 8/3/2019 Website for Mtnl

    12/117

    GANTT CHART

    6/9/200 96/14/20096/19/200 96/24/200 96/29/20 097/4/200 97/9/20 097/14/2009

    Recogni t ion

    of need

    Feasibil ity

    Study

    Analysis

    Des ign

    Development

    Testing

    M aintenanc e

    Start Date

    Duration(day

    Page | 12

  • 8/3/2019 Website for Mtnl

    13/117

    SYSTEM MODEL

    There are various software development approaches

    defined and designed which are used/employed during

    development process of software, these approaches are also

    referred as "Software Development Process Models". Each

    process model follows a particular life cycle in order to

    ensure success in process of software development.

    EVOLUTIONARY MODEL

    Evolutionary development is away of developing an

    initial development exposing it to the user component and refining

    it, with many versions, so as to develop an adequate system.There are basically three types of Evolutionary software process

    model:-

    1. Incremental Model.

    2. Spiral Model.

    3. Component Based Model.

    During the project we have used Spiral Model. The description of

    model is as follows:-

    Page | 13

  • 8/3/2019 Website for Mtnl

    14/117

    The Spiral Model is an Evolutionary software process model that

    couples the iterative nature of prototyping with the controlled and

    systematic aspects of the linear sequential-model.

    Using the spiral model software is developed in a series of

    incremental releases. During early iterations the incremental

    release might be a paper model or prototype. During later iterations

    increasingly more complete versions of the engineered systems are

    produced.

    A Spiral model is divided into a number of framework

    activities also called task reasons. There are basically six task

    reasons they are:-

    1. Customer communication.

    2. Planning.

    3. Risk Analysis.

    4. Engineering.

    5. Construction and release.

    6. Customer evaluation.

    Page | 14

  • 8/3/2019 Website for Mtnl

    15/117

    Page | 15

  • 8/3/2019 Website for Mtnl

    16/117

    The descriptions of these tasks are as follows:-

    1. Customer communication: - Customer communication task required

    establishing effective communication between developer and

    customer.

    2. Planning: - Planning task is to define resources, timelines and other

    project and related information.

    3. Risk Analysis: - Risk analysis task is required to access both

    technical and management risk.

    4. Engineering:-Engineering task requires building one or more

    representation of the application.

    5. Construction and release: - Construction and release task required

    constructing, task, installation, and providing user support.

    6. Customer Evaluation: - Customer Evaluation task required obtaining

    customer feedback based on the evaluation of the softwarerepresentation created during the installation stage.

    From fig. In this model the software engineering team moves around

    the spiral in a clockwise direction beginning at the center.

    The first circuit around the spiral model might result in the

    development of the product specification. Sub-sequent passes around

    the spiral might be used to develop a prototype and then progressively

    more sophisticated versions of the software.

    Page | 16

  • 8/3/2019 Website for Mtnl

    17/117

    RECOGNITION OF NEED

    The first step is to identify a need for the new system. This

    will include determining whether a business problem or

    opportunity exists, conducting a feasibility study to

    determine if the proposed solution is cost effective, and

    developing a project plan.

    This process may involve end users who come up with anidea for improving their work. Ideally, the process occurs

    in tandem with a review of the organization's strategic plan

    to ensure that IT is being used to help the organization

    achieve its strategic objectives. Management may need to

    approve concept ideas before any money is budgeted for its

    development.

    Problem definition defines the user requirements,or whatthe user expects out of the system.This also includes a

    rough idea of the resource requirement for the project.

    The main objective of MTNL Broadband Services website

    System is to provide customers a easy and efficient way to

    see their internet usages, bill details, customer details etc.

    apart from helping the employees of MTNL in organizing

    and maintaining the records of customers efficiently. The

    records are automatically updated in the database when any

    transaction takes place.

    Page | 17

  • 8/3/2019 Website for Mtnl

    18/117

    A commonly used checklist for verifying requirements

    consists of the following:

    Correct Simply put, does the requirement correctly

    reflect what the user wants?

    Complete Ensure no elements are missing from the

    requirement, does the requirement describe allpossible values, what about

    performance/security/accessibility aspects of a

    requirement?

    Consistent Checking that there are no contradictions

    within the requirements.

    Feasible Can the requirement be delivered given the

    technology, time and budget constraints.

    Testable Is the expected result known and can it beprogramatically or visually verified?

    Page | 18

  • 8/3/2019 Website for Mtnl

    19/117

    NEED IDENTIFICATION

    The main problem in an organization like a telecom

    industry is record maintenance of each and every customer

    and to provide each customer the details of its internetusage. Internet has entered in everyones life so a

    organization has to pace up with the world . Since there can

    be many intervals of internet usages everyday so a

    organization providing such facility should maintain a

    record for each and every interval for which internet is used

    , bill maintenance etc., therefore it is necessary to maintain

    large number of records. Moreover it is very difficult to use

    them for future references, therefore the need for website is

    felt.

    Page | 19

  • 8/3/2019 Website for Mtnl

    20/117

    FEASIBILITY STUDY

    Feasibility study is a procedure that identifies, describes

    and evaluates the system.

    The objective of a feasibility study is to acquire a sense of

    its scope for solving the problem. Size of the project isdetermined. Costs and benefits are also estimated with

    greater accuracy at this stage.

    Preliminary analysis would examine the project feasibility,

    i.e. to evaluate whether it would be worthwhile to proceed

    with the project. The key considerations involved in the

    feasibility analysis are:

    Technical Feasibility

    Economic Feasibility

    Behavioural Feasibility

    Page | 20

  • 8/3/2019 Website for Mtnl

    21/117

    TECHNICAL FEASIBILITY: It determines whether the

    technology needed for the proposed system is available and

    how it can be integrated within the organization. It also

    assess whether the staff have the expertise to assimilate and

    use the new technology. It is concerned with specifying

    equipment and software that will successfully support the

    required task.

    ECONOMIC FEASIBILITY: The purpose of assessing

    economic feasibility is to identify the financial benefits and

    costs associated with the development project. It is also

    called Cost-Benefit Analysis.

    BEHAVIOURAL FEASIBILITY: People are resistant to

    change so an estimate should be made of how strong a

    reaction the user staff is likely to have towards the

    development of proposed system.

    Page | 21

  • 8/3/2019 Website for Mtnl

    22/117

    COST-BENEFIT ANALYSIS

    It is a tool for evaluating the effectiveness of the project. It

    may be used by the management to decide as to what extent

    benefits outweigh the costs. The costs associated with the

    proposed business system are the expenses arising from

    developing, installing, training and implementing the

    system.

    We started the project by listing the possible queries that

    the user might want to satisfy and on these lines we guided

    the project further. Following are the drawbacks which our

    project overcomes:

    Firstly, there are expenses in maintaining the human

    resource and more staff is required in maintaining the data.

    Secondly, the time involved in recording the data is also

    more.

    Thirdly, if the project is to be used for future references

    then the whole records have to be searched to find out one

    single record, which is very time consuming.

    The cost of storing the data and retrieval of data is less. Nodoubt initially the cost of installing the hardware and

    providing training to the user staff will be high but in long

    run benefits are more than the costs; thus our project is

    ECONOMICAL FEASIBLE.

    Page | 22

  • 8/3/2019 Website for Mtnl

    23/117

    SYSTEM ANALYSIS

    It is the detailed understanding of all important facts of the

    business area under investigation. The relationships of

    various system components among themselves and with

    environment are studied and understood. This requires data

    collection from a variety of sources like questionnaires,

    forms, interviews, records etc.

    Structured analysis is a set of techniques and graphical

    tools that allow the analysis to develop a new kind of

    system specifications that are easily understandable to the

    user. The structured analysis considers new goals and

    structured tools for analysis. The new goals specify the

    following:

    Use of graphics wherever possible to help better

    communication.

    To differentiate between logical and physical system.

    Page | 23

  • 8/3/2019 Website for Mtnl

    24/117

    WORKING ENVIRONMENT

    The project Courier Services Management System has been

    made in Java and Oracle 9i. The server used in this project

    is BEA Weblogic Platform 8.1

    JAVA

    Java was conceived by James Gosling, Patrick Naughton,

    Chris Warth, Ed Frank, and Mike Sheridan at Sun

    Microsystems, Inc. in 1991. It took 18 months to develop

    the first working version. This language was initially called

    Oak but was renamed Java

    in 1995.

    IMPORTANCE OF JAVA

    Java Applications and Applets

    Java can be used to create two types of programs:

    applications and applets. An application is a program thatruns on your computer, under the operating system of that

    computer. That is, an application created by Java is more or

    less like one created using C or C++. When used to create

    applications, Java is not much different from any other

    Page | 24

  • 8/3/2019 Website for Mtnl

    25/117

    computer language. Rather, it is Javas ability to create

    applets that makes it important.

    An appletis an application designed to be transmitted overthe Internet and executed by a Java-compatible Webbrowser. An applet is actually a tiny Java program,

    dynamically downloaded across the network, just like an

    image, sound file, or video clip. The important difference is

    that an applet is an intelligent program, not just an

    animation or media file. In other words, an applet is a

    program that can react to user input and dynamically

    changenot just run the same animation or sound over andover.

    Security

    When you use a Java-compatible Web browser, you can

    safely download Java applets without fear of viral infection

    or malicious intent. Java achieves this protection by

    confining a Java program to the Java executionenvironment and not allowing it access to other parts of the

    computer.

    Portability

    Many types of computers and operating systems are in use

    throughout the worldand many are connected to the

    Internet. For programs to be dynamically downloaded to all

    the various types of platforms connected to the Internet,

    some means of generating portable executable code is

    needed. Java provides portability.

    Page | 25

  • 8/3/2019 Website for Mtnl

    26/117

    Bytecode

    Bytecode is a highly optimized set of instructions designed

    to be executed by the Java run-time system, which is called

    theJava Virtual Machine (JVM). That is, in its standardform, the JVM is an interpreter for bytecode

    FEATURES OF JAVA

    Simple

    Secure

    Portable

    Object-oriented

    Robust

    Multithreaded Architecture-neutral

    Interpreted

    High performance

    Distributed

    Dynamic

    PACKAGES

    Packages are containers for classes that are used to keepthe class name space compartmentalized.

    Page | 26

  • 8/3/2019 Website for Mtnl

    27/117

    This is the general form of the package statement:

    packagepkg;

    SERVLETS

    Servlets are small programs that execute on the server side

    of a Web connection. Just as applets dynamically extend

    the functionality of a Web browser, servlets dynamically

    extend the functionality of a Web server.

    The Life Cycle of a Servlet

    Three methods are central to the life cycle of a servlet.

    These are init( ), service( ), and destroy( ). They are

    implemented by every servlet and are invoked at specifictimes by the server.

    The basic steps are the following:

    1. Create and compile the servlet source code.

    2. Start Weblogic.

    3. Start a Web browser and request the servlet.

    The javax.servlet Package

    Page | 27

  • 8/3/2019 Website for Mtnl

    28/117

    Thejavax.servletpackage contains a number of interfaces

    and classes that establish the framework in which servlets

    operate. The following table summarizes the core interfacesthat are provided in this package. The most significant of

    these is Servlet. All servlets must implement this interface

    or extend a class that implements the interface.

    The ServletRequest and ServletResponse interfaces are

    also very important.

    Interface Description

    Servlet Declares life cycle methods for a servlet.

    ServletConfig Allows servlets to get initialization

    parameters.

    ServletContext Enables servlets to log events and access

    information about their environment.

    ServletRequest Used to read data from a client request.

    ServletResponse Used to write data to a client response.

    SingleThreadModel Indicates that the servlet is thread

    safe.

    Page | 28

  • 8/3/2019 Website for Mtnl

    29/117

    The WebLogic Server

    Today's business environment demands Web and e-

    commerce applications that accelerate our entry into newmarkets, help us find new ways to reach and retain

    customers, and allow us to introduce new products and

    services quickly. To build and deploy these new

    solutions, we need a proven, reliable e-commerce

    platform that can connect and empower all types of users

    while integrating our corporate data, mainframe

    applications, and other enterprise applications in a

    powerful, flexible, end-to-end e-commerce solution. Oursolution must provide the performance, scalability, and

    high availability needed to handle your most critical

    enterprise-scale computing.

    As the industry-leading e-commerce transaction platform,

    WebLogic Server allows us to quickly develop and

    deploy reliable, secure, scalable and manageable

    applications. It manages system-level details so we canconcentrate on business logic and presentation.

    WebLogic Server is an application server: a platform for

    developing and deploying multitier distributed enterprise

    Page | 29

  • 8/3/2019 Website for Mtnl

    30/117

    applications. WebLogic Server centralizes application

    services such as Web server functionality, business

    components, and access to backend enterprise systems. Ituses technologies such as caching and connection pooling

    to improve resource use and application performance.

    WebLogic Server also provides enterprise-level security

    and powerful administration facilities.

    WebLogic Server operates in the middle tier of a

    multitier (orn-tier) architecture. A multitier architecturedetermines where the software components that make up

    a computing system are executed in relation to each other

    and to the hardware, network, and users. Choosing the

    best location for each software component lets us develop

    applications faster; eases deployment and administration;

    and provides greater control over performance,

    utilization, security, scalability, and reliability.

    WebLogic Server implements J2EE, the Java Enterprise

    standard. Java is a network-savvy, object-oriented

    programming language, and J2EE includes component

    technologies for developing distributed objects. This

    functionality adds a second dimension to the WebLogic

    Server application architecturea layering of application

    logic, with each layer selectively deployed among

    WebLogic Server J2EE technologies.

    J2EE Platform

    Page | 30

  • 8/3/2019 Website for Mtnl

    31/117

    WebLogic Server contains Java 2 Platform, Enterprise

    Edition (J2EE) technologies. J2EE is the standard

    platform for developing multitier enterprise applicationsbased on the Java programming language. The

    technologies that make up J2EE were developed

    collaboratively by Sun Microsystems and other software

    vendors, including BEA Systems.

    J2EE applications are based on standardized, modular

    components. WebLogic Server provides a complete set of

    services for those components and handles many details

    of application behavior automatically, without requiring

    programming.

    FEATURES OF WEBLOGIC 8.1

    WebLogic Server provides essential features for

    developing and deploying mission-critical e-commerce

    applications across distributed, heterogeneous computing

    environments. These features include the following:

    Standards leadershipComprehensive Enterprise

    Java support to ease implementation and deployment

    of application components. WebLogic Server is the

    first independently developed Java application server

    to achieve J2EE certification. Rich client optionsWebLogic Server supports Web

    browsers and other clients that use HTTP; Java clients

    that use RMI (Remote Method Invocation) or IIOP

    (Internet Inter-ORB Protocol); and mobile devices that

    use (WAP) Wireless Access Protocol. Connectors

    Page | 31

  • 8/3/2019 Website for Mtnl

    32/117

    from BEA and other companies enable virtually any

    client or legacy application to work with a WebLogic

    Server application. Flexible Web servicesWebLogic Server provides a

    solid platform for deploying Web services as

    components of a heterogeneous distributed

    application. Web services use a cross-platform, cross-

    language data model (XML) to provide

    interoperability among application components on

    diverse hardware and software platforms.

    Enterprise e-business scalabilityEfficient use and

    high availability of critical resources are achieved

    through Enterprise JavaBean business components and

    mechanisms such as WebLogic Server clustering for

    dynamic Web pages, backend resource pooling, and

    connection sharing. Robust administrationWebLogic Server offers a

    Web-based Administration Console for configuring

    and monitoring WebLogic Server services. A

    command-line interface for configuration makes it

    convenient to administer WebLogic Servers with

    scripts.

    E-commerce-ready securityWebLogic Serverprovides Secure Sockets Layer (SSL) support for

    encrypting data transmitted across WebLogic Server,

    clients, and other servers. WebLogic security realms

    feature user authentication and authorization for all

    WebLogic Server services. External security stores,

    Page | 32

  • 8/3/2019 Website for Mtnl

    33/117

    such as Lightweight Directory Access Protocol

    (LDAP) servers, can be adapted to WebLogic realms,

    enabling single sign-on for the enterprise. TheSecurity Service Provider Interface makes it possible

    to extend WebLogic Security services and to

    implement WebLogic Security features in

    applications.

    Maximum development and deployment flexibility

    WebLogic Server provides tight integration with

    and support for leading databases, development tools,

    and other environments.

    The next two sections describe these two views of

    WebLogic Server architecture: software tiers and

    application logic layers.

    Software Component TiersThe software components of a multitier architecture

    consist of three tiers:

    The client tiercontains programs executed by users,including Web browsers and network-capable

    application programs. These programs can be written

    in virtually any programming language.

    The middle tiercontains WebLogic Server and otherservers that are addressed directly by clients, such as

    existing Web servers or proxy servers.

    Page | 33

  • 8/3/2019 Website for Mtnl

    34/117

    The backend tiercontains enterprise resources, such asdatabase systems, mainframe and legacy applications,

    and packaged enterprise resource planning (ERP)

    applications.

    Client applications access WebLogic Server directly, or

    through another Web server or proxy server. WebLogic

    Server generally connects with backend services onbehalf of clients. However, clients may directly access

    backend services using a multitier JDBC driver.

    Client-Tier Components

    WebLogic Server clients use standard interfaces to access

    WebLogic Server services. WebLogic Server has

    complete Web server functionality, so a Web browser canrequest pages from WebLogic Server using the Web's

    standard HTTP protocol. WebLogic Server servlets and

    JavaServer Pages (JSPs) produce the dynamic,

    personalized Web pages required for advanced e-

    commerce Web applications.

    Client programs written in Java may include highly

    interactive graphical user interfaces built with Java Swingclasses. They can also access WebLogic Server services

    using standard J2EE APIs.

    Page | 34

  • 8/3/2019 Website for Mtnl

    35/117

    All these services are also available to Web browser

    clients by deploying servlets and JSP pages in WebLogic

    Server.

    Middle-Tier Components

    The middle tier includes WebLogic Server and other

    Web servers, firewalls, and proxy servers that mediate

    traffic between clients and WebLogic Server. The Nokia

    WAP server, part of the BEA mobile commerce solution,is an example of another middle tier server that provides

    connectivity between wireless devices and WebLogic

    Server.

    Applications based on a multitier architecture require

    reliability, scalability, and high performance in the

    middle tier. The application server you select for the

    middle tier is, therefore, critical to the success of yoursystem.

    The WebLogic Server cluster option allows you to

    distribute client requests and back-end services among

    multiple cooperating WebLogic Servers. Programs in the

    client tier access the cluster as if it were a single

    WebLogic Server. As the workload increases, you can

    add WebLogic Servers to the cluster to share the work.The cluster uses a selectable load-balancing algorithm to

    choose a WebLogic Server in the cluster that is capable

    of handling the request.

    Page | 35

  • 8/3/2019 Website for Mtnl

    36/117

    When a request fails, another WebLogic Server that

    provides the requested service can take over. Failover is

    transparent whenever possible, which minimizes theamount of code that must be written to recover from

    failures. For example, servlet session state can be

    replicated on a secondary WebLogic Server so that if the

    WebLogic Server that is handling a request fails, the

    client's session can resume uninterrupted on the

    secondary server. WebLogic EJB, JMS, JDBC, and RMI

    services are all implemented with clustering capabilities.

    Backend-Tier Components

    The backend tier contains services that are accessible to

    clients only through WebLogic Server. Applications in

    the backend tier tend to be the most valuable and

    mission-critical enterprise resources. WebLogic Server

    protects them by restricting direct access by end users.

    With technologies such as connection pools and caching,WebLogic Server uses back-end resources efficiently and

    improves application response.

    Backend services include databases, enterprise resource

    planning (ERP) systems, mainframe applications, legacy

    enterprise applications, and transaction monitors.

    Existing enterprise applications can be integrated into the

    backend tier using the Java Connector Architecture (JCA)specification from Sun Microsystems. WebLogic Server

    makes it easy to add a Web interface to an integrated

    backend application.

    Page | 36

  • 8/3/2019 Website for Mtnl

    37/117

    A database management system is the most common

    backend service, required by nearly all WebLogic Server

    applications. WebLogic EJB and WebLogic JMStypically store persistent data in a database in the backend

    tier.

    A JDBC connection pool, defined in WebLogic Server,

    opens a predefined number of database connections.

    Once opened, database connections are shared by all

    WebLogic Server applications that need database access.

    The expensive overhead associated with establishing a

    connection is incurred only once for each connection in

    the pool, instead of once per client request. WebLogic

    Server monitors database connections, refreshing them as

    needed and ensuring reliable database services for

    applications.

    WebLogic Enterprise Connectivity, which provides

    access to BEA WebLogic EnterpriseTM systems, and

    Jolt for WebLogic Server, which provides access to

    BEA Tuxedo systems, also use connection pools to

    enhance system performance.

    Application Logic Layers

    WebLogic Server implements J2EE component

    technologies and services. J2EE component technologies

    include servlets, JSP Pages, and Enterprise JavaBeans.

    J2EE services include access to standard network

    protocols, database systems, and messaging systems. To

    build a WebLogic Server application, you must create

    Page | 37

  • 8/3/2019 Website for Mtnl

    38/117

    and assemble components, using the service APIs when

    necessary.

    Components are executed in the WebLogic Server Webcontainer or EJB container. Containers provide the life

    cycle support and services defined by the J2EE

    specifications so that the components you build do not

    have to handle underlying details.

    JDBC

    Java Database Connectivity (JDBC) provides access tobackend database resources. Java applications access

    JDBC using a JDBC driver, which is a database vendor-

    specific interface for a database server. Although any

    Java application can load a vendor's JDBC driver,

    connect to the database, and perform database operations,

    WebLogic Server provides a significant performance

    advantage by offering JDBC connection pools.A JDBC connection pool is a named group of JDBC

    connections managed through WebLogic Server. At

    startup time WebLogic Server opens JDBC connections

    and adds them to the pool. When an application requires

    a JDBC connection, it gets a connection from the pool,

    uses it, and then returns it to the pool for use by for other

    applications. Establishing a database connection is oftena time-consuming, resource-intensive operation, so a

    connection pool, which limits the number of connection

    operations, improves performance.

    WebLogic Server also provides JDBC multipools for

    achieving load balancing or high availability capabilities

    Page | 38

  • 8/3/2019 Website for Mtnl

    39/117

    with database connections in single-server

    configurations. Multipools are a "pool of pools" that

    provide a configurable algorithm for choosing which poolto provide a connection for a given request. Currently,

    WebLogic Server provides algorithms to support either

    high availability or load balancing behavior for database

    connections.

    To register a connection pool in the JNDI naming tree,

    define a DataSource object for it. Java client applications

    can then get a connection from the pool by performing a

    JNDI lookup on the DataSource name.

    Server-side Java classes use the WebLogic JDBC pool

    driver, which is a generic JDBC driver that calls through

    to the vendor-specific JDBC driver. This mechanism

    makes application code more portable, even if you

    change the brand of database used in the backend tier.

    The client-side JDBC driver is the WebLogic JDBC/RMIdriver, which is an RMI interface to the pool driver. Use

    this driver the same way you use any standard JDBC

    driver. When the JDBC/RMI driver is used, Java

    programs can access JDBC in a manner consistent with

    other WebLogic Server distributed objects, and they can

    keep database data structures in the middle tier.

    Page | 39

  • 8/3/2019 Website for Mtnl

    40/117

    ORACLE

    The concept of a relational database is not new. It was

    originally developed back in 1970 by Dr. E.F. Codd. He

    laid down the theory of relational databases in his seminalpaper entitled A Relational Model of Data for Large

    Shared Data Banks published in Communications of the

    ACM(Association for Computing Machinery), Vol. 13, No.6, June 1970.

    The basic concepts of a relational database are fairly easy

    to understand. A relational database is a collection of

    related information that has been organized into structuresknown as tables. Each table contains rows that are furtherorganized into columns. These tables are stored in the

    database in structures known asschemas, which are areaswhere database users may store their tables. Each user may

    Page | 40

  • 8/3/2019 Website for Mtnl

    41/117

    also choose to grant permissions to other users to access

    their tables.

    For a database accessed using a computer, the databasemanagement system is the software that manages the files

    stored in the file system of the computer. The Oracle

    database is one such piece of software; other examples

    include SQL Server, DB2, and MySQL.

    Of course, every database must have some way to get data

    in and out of it, preferably using a common language

    understood by all databases. Todays database management

    systems implement a standard language known as

    Structured Query Language, or SQL. Among other things,SQL allows you to retrieve, add, update, and delete

    information in a database

    Structured Query Language (SQL)

    Structured Query Language (SQL) is the standard language

    designed to access relational databases. SQL is pronounced

    either as the word sequel or as the letters S-Q-L. (I

    prefer sequel as its quicker to say.)

    SQL is based on the groundbreaking work of Dr. E.F.

    Codd, with the first implementation of SQL being

    developed by IBM in the mid-1970s. IBM was conductinga research project known as System R, and SQL was born

    from that project. Later in 1979, a company then known as

    Relational Software Inc. (known today as Oracle

    Corporation) released the first commercial version of SQL.

    SQL is now fully standardized and recognized by the

    Page | 41

  • 8/3/2019 Website for Mtnl

    42/117

    American National Standards Institute (ANSI). You can

    use SQL to access an Oracle, SQL Server, DB2, or MySQL

    database.SQL uses a simple syntax that is easy to learn and use.

    Youll see some simple examples of its use in this chapter.

    There are five types of SQL statements, outlined in the

    following list:

    Query statements Allow you to retrieve rows stored

    in database tables. You write a query using the SQL

    SELECT statement.

    Data Manipulation Language (DML)statements Allow you to modify the contents of

    tables. There are three DML statements:

    o INSERT Allows you to add rows to a table.

    o UPDATE Allows you to change a row.

    o DELETE Allows you to remove rows.

    o

    Data Definition Language (DDL) statements Allow

    you to define the data structures, such as tables, that

    make up a database. There are five basic types of DDL

    statements:

    Page | 42

  • 8/3/2019 Website for Mtnl

    43/117

    o CREATE Allows you to create a database

    structure. For example, CREATE TABLE is used

    to create a table; another example is CREATEUSER, which is used to create a database user.

    o ALTER Allows you to modify a database

    structure. For example, ALTER TABLE is used

    to modify a table.

    o DROP Allows you to remove a database

    structure. For example, DROP TABLE is used to

    remove a table.

    o RENAME Allows you to change the name of atable.

    o TRUNCATE Allows you to delete the entire

    contents of a table.

    Transaction Control (TC) statements Allow you to

    permanently record the changes made to the rowsstored in a table or undo those changes. There are

    three TC statements:

    o COMMIT Allows you to permanently record

    changes made to rows.

    o ROLLBACK Allows you to undo changesmade to rows.

    o SAVEPOINT Allows you to set a savepoint

    to which you can roll back changes made to rows.

    Page | 43

  • 8/3/2019 Website for Mtnl

    44/117

    Data Control Language (DCL) statements Allow

    you to change the permissions on database structures.

    There are two DCL statements:

    o GRANT Allows you to give another user access

    to your database structures, such as tables.

    o REVOKE Allows you to prevent another user

    from accessing to your database structures, such

    as tables.

    Page | 44

  • 8/3/2019 Website for Mtnl

    45/117

    DATABASE DESIGN

    1. cust account_no number(20),

    type varchar(20),user_name varchar(25),

    password varchar(20),

    create_date varchar(20),

    phone number(15),

    mobile number(15),

    email varchar(30),

    address varchar(40),plan_name varchar(30)

    2. Packagepackage_id number(10),name varchar(20),

    connection varchar(20),

    description varchar(500),

    validity varchar(20),

    available_service varchar(20)

    charge number(10)

    free number(10)

    Page | 45

  • 8/3/2019 Website for Mtnl

    46/117

    3. Usageinfo account_no number(20),

    start_time varchar(20),end_time varchar(20),

    upload number(10),

    download number(10)

    4. Bill account_no number(20),

    area varchar(20),

    delivery_mode varchar(20),

    bill_date varchar(20),

    bill_no number(10),

    amount number(20),

    status varchar(20),

    problem varchar(20)

    Page | 46

  • 8/3/2019 Website for Mtnl

    47/117

    FORM DESIGN

    This is the login page which will be displayed to everyoneincluding the administrator and employee. Whenever a custome

    employee or administrator fills up the details like username and

    password then the corresponding page displays up.

    Page | 47

  • 8/3/2019 Website for Mtnl

    48/117

    HOME PAGE FOR CUSTOMER

    When the customer signs in this page is displayed up showing

    the customer information. On clicking the Customer Information onthe menu bar, again this page is displayed up where the customer can

    see his details like username, account no., phone no., address, plan et

    Page | 48

  • 8/3/2019 Website for Mtnl

    49/117

    On clicking the Billing Information tab on the menu bar, this

    page is displayed up where the customer can see his bill details

    like last bill amount, status of the bill, bill date etc.

    Page | 49

  • 8/3/2019 Website for Mtnl

    50/117

    If the user wants to change his password then on clicking

    Account Mgt tab, a customer can see this page where he

    has to type his current password and in the new password textboxhe has to type the password with which he wants to replace his

    current password.

    On other page we get this type of output

    Page | 50

  • 8/3/2019 Website for Mtnl

    51/117

    On clicking the Contact us on the menu bar, this page is displayed

    up where the customer can see his details of the staff whom theyhave to contact in case they have problem in their account or some

    detail has to be changed in the records.

    Page | 51

  • 8/3/2019 Website for Mtnl

    52/117

    This is the page forUsage Information where customer will be

    able to see how much internet usage he has done. The start date and

    time along with end date and time is displayed. The amount of MBs

    used in uploading the web pages and those used for downloading arealso displayed.

    Page | 52

  • 8/3/2019 Website for Mtnl

    53/117

    Clicking Balance Information tells you how much MBs you have

    used and how much free MBs the customer gets every month if it isin its package. The amount of MBs left in case he gets some free

    MBs is displayed.

    Page | 53

  • 8/3/2019 Website for Mtnl

    54/117

    Package Information tells the various packages available in

    MTNL so that customer can have the ease to see the various

    options provided to him.

    Page | 54

  • 8/3/2019 Website for Mtnl

    55/117

    HOME PAGE FOR EMPLOYEE

    An employee after signing in will see this page. He will have the

    options to add new records of customers, delete existing records or do

    some updations in the customers records. Apart from this the details

    of employee is displayed on the page.

    Page | 55

  • 8/3/2019 Website for Mtnl

    56/117

    This page is displayed whenever employee clicks on ADD tab.

    Various information regarding the customer like name, address,

    contact details etc. have to be filled and then click on the

    corresponding button.

    Page | 56

  • 8/3/2019 Website for Mtnl

    57/117

    On next page, we are shown whether the record is inserted or not.

    This page is displayed whenever employee clicks on DELETE tab.

    Customers Account number whose record has to be deleted should bentered and then click on the corresponding button.

    Page | 57

  • 8/3/2019 Website for Mtnl

    58/117

    On the next page, we get the details of that account no. of the custome

    Page | 58

  • 8/3/2019 Website for Mtnl

    59/117

    After that if the record is deleted then it is visible on next page

    This page is displayed whenever employee clicks on UPDATE tab.

    Customers Account number whose record has to be updated should

    be entered and then click on the corresponding button. His informatio

    is displayed on the next page. Updations are done and the button is

    clicked.

    Page | 59

  • 8/3/2019 Website for Mtnl

    60/117

    On the next page, we get the details of that account no. of the custome

    Page | 60

  • 8/3/2019 Website for Mtnl

    61/117

    After that if the record is updated then it is visible on next page

    If the employee wants to view the details of customers belonging to a

    particular area then he clicks on the AREAWISE tab under ViewCustomer. Employee has to enter the area name and click on the butto

    Page | 61

  • 8/3/2019 Website for Mtnl

    62/117

    On next page, customers having that area will be displayed

    If the employee wants to view the details of customers belonging to a

    particular package/plan then he clicks on the PLANWISE tab under

    View Customer. Employee has to enter the plan name and click on the

    button.

    Page | 62

  • 8/3/2019 Website for Mtnl

    63/117

    On next page,

    If the employee wants to view the details of customers belonging to a

    particular bill no. then he clicks on the bill no. tab under View Bill.Employee has to enter the bill no. and click on the button.

    Page | 63

  • 8/3/2019 Website for Mtnl

    64/117

    On next page, customer having that bill no. will be displayed

    If the employee wants to view the details of customers belonging to a

    particular payment mode then he clicks on the Delivery mode tab

    under View Bill. Employee has to enter the mode like cash or cheque

    and click on the button.

    Page | 64

  • 8/3/2019 Website for Mtnl

    65/117

    On next page, customer having that details of customers will be

    displayed

    If the employee wants to view the details of customers belonging to a

    particular group of bill amount then he clicks on the Amountwise tabunder View Bill. Employee has to click on the corresponding button

    for which he has to see the details of the customers.

    Page | 65

  • 8/3/2019 Website for Mtnl

    66/117

    On next page, customer details will be displayed

    If the employee wants to view the details of customers whose last bill

    disputed or undisputed then he clicks on the Status tabunder View Bill. Employee has to enter the corresponding text whethe

    bill is disputed or undisputed and click on the button.

    Page | 66

  • 8/3/2019 Website for Mtnl

    67/117

    On next page, customer details will be displayed

    HOME PAGE FOR ADMINISTRATOR

    This page displays up when administrator signs in. His details are

    shown on this page. He has the option to add, delete or update record

    of employees apart from having all the privileges which a employee

    gets like adding, deleting, updating records of customers and other

    view options.

    Page | 67

  • 8/3/2019 Website for Mtnl

    68/117

    This page is displayed whenever the administrator clicks on ADD andthen on employee tab. Various information regarding the employee

    like name, address, contact details etc. have to be filled and then click

    on the corresponding button.

    Page | 68

  • 8/3/2019 Website for Mtnl

    69/117

    On the next page, we get the result whether the record is inserted or no

    This page is displayed whenever administrator clicks on DELETE an

    then on Employee tab. Employees Account number whose record ha

    to be deleted should be entered and then click on the corresponding

    button.

    Page | 69

  • 8/3/2019 Website for Mtnl

    70/117

    On the next page, we get the details of that account no. of the employe

    Page | 70

  • 8/3/2019 Website for Mtnl

    71/117

    After that if the record is deleted then it is visible on next page

    This page is displayed whenever Administrator clicks on UPDATE

    and then on Employee tab. Employees Account number whose

    record has to be updated should be entered and then click on the

    corresponding button. His information is displayed on the next page.

    Updations are done and the button is clicked.

    Page | 71

  • 8/3/2019 Website for Mtnl

    72/117

    On the next page, we get the details of that account no. of the employe

    Page | 72

  • 8/3/2019 Website for Mtnl

    73/117

    After that if the record is updated then it is visible on next page

    This page is displayed whenever Administrator clicks on VIEW

    EMPLOYEE. Details of all the employees can be seen here.

    Page | 73

  • 8/3/2019 Website for Mtnl

    74/117

    CODING

    LOGIN PAGE

    Page | 74

  • 8/3/2019 Website for Mtnl

    75/117

    (JSP PAGE)

    Welcome to Mahanagar Telephone Nigam Limited

    Welcome to MTNL Broadband Services

    USER NAME


    PASSWORD:



    Customers are advised to change the password from security perspective. For Triband the password

    should be changed at two places in a specific order. For detailed procedure refer Triband User's Guide.You may also dial 1504 and obtain online help.



    In Case of difficulties or suggestions please contact: MTNL Delhi Office,

    Ph. : 22221504/1504 OR Email: [email protected]

    Copyright (c) 2004, Mahanagar Telephone Nigam Limited. All Rights Reserved


    Page | 75

  • 8/3/2019 Website for Mtnl

    76/117


    Best Viewed with Internet Explorer 5.5 or above and Netscape(4.7 & 7.1 versions) in 1024 X 800

    resolution

    SERVLET FILE FOR LOGIN PAGE

    package pack;

    import java.io.*;

    import java.sql.*;import javax.servlet.*;

    import javax.servlet.http.*;

    public class log extends HttpServlet

    {

    public void doPost(HttpServletRequest rq, HttpServletResponse rs)throws IOException,ServletExcepti{

    PrintWriter pw=rs.getWriter();

    Connection con;

    String us,pd,tp;try

    {

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");con=DriverManager.getConnection("jdbc:odbc:mydsn","scott","tiger");

    Statement st=con.createStatement();us=rq.getParameter("c1");

    pd=rq.getParameter("c2");

    ResultSet rst=st.executeQuery("select * from cust where (user_name='"+us+"' and

    password='"+pd+"')");

    Page | 76

  • 8/3/2019 Website for Mtnl

    77/117

    if(rst.next())

    {

    int a=rst.getInt(1);

    String type=(rst.getString(2)).trim();System.out.println(type);

    System.out.println(type.equals("admin"));

    if(type.equals("admin"))rs.sendRedirect("admin.jsp?ii="+a);

    else if(type.equals("emp"))

    rs.sendRedirect("emp.jsp?jj="+a);else

    rs.sendRedirect("one.jsp?kk="+a);

    }else

    pw.println("Record doesnot exist");

    }catch(Exception e)

    {

    System.out.println("OUT");}

    }

    }

    USAGEWISE INFORMATION

  • 8/3/2019 Website for Mtnl

    78/117

    pk.println("Home");

    con.close();

    }

    catch(Exception e){

    System.out.println("Error in connection");

    }

    %>

  • 8/3/2019 Website for Mtnl

    79/117

    PrintWriter pb=response.getWriter();

    try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    Connection con=DriverManager.getConnection("jdbc:odbc:mydsn","scott","tiger");

    Statement st=con.createStatement();

    int pp=Integer.parseInt(request.getParameter("ui"));

    System.out.println(pp);

    pb.println("Billing Info");

    con.close();

    }

    catch(Exception e){

    System.out.println("Error in connection");

    }%>

    Account Mgt

    Package Info

    Contact us

    Logout

    Page | 79

  • 8/3/2019 Website for Mtnl

    80/117

  • 8/3/2019 Website for Mtnl

    81/117

    System.out.println(p);

    pu.println("usage Info");

    con.close();

    }catch(Exception e)

    {

    System.out.println("Error in connection");}

    %>







    Usage Information


  • 8/3/2019 Website for Mtnl

    82/117

    pw.println(""+a+""+start+""+end+""+up+""+down+"");

    }

    con.close();

    }catch(Exception e)

    {

    System.out.println("Error in connection");}

    %>

    ACCOUNT MANAGEMENT

    package pack;

    import java.io.*;

    import java.sql.*;import javax.servlet.*;

    import javax.servlet.http.*;

    public class account extends HttpServlet{

    public void doPost(HttpServletRequest rq, HttpServletResponse rs)throws IOException,ServletExcepti

    {PrintWriter pw=rs.getWriter();

    Connection con;

    int oldp,newp,r=0;try

    {

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    con=DriverManager.getConnection("jdbc:odbc:mydsn","scott","tiger");

    Statement st=con.createStatement();

    oldp=Integer.parseInt(rq.getParameter("t1"));

    ResultSet rst=st.executeQuery("select password from cust where password="+oldp);

    newp=Integer.parseInt(rq.getParameter("t2"));

    Page | 82

  • 8/3/2019 Website for Mtnl

    83/117

    if(rst.next()){

    r=st.executeUpdate("update cust set password="+newp+"where password="+oldp);

    System.out.println(r);

    }if(r!=0)

    pw.println("password updated");

    elsepw.println("mismatch password");

    }

    catch(Exception e){

    System.out.println(e);

    }}

    }

    Package Information

    MTNL BROADBAND





    Package Information


  • 8/3/2019 Website for Mtnl

    84/117

    while(rst.next()){

    int a=rst.getInt(1);

    String name=rst.getString(2);

    String conn=rst.getString(3);String desc=rst.getString(4);

    String val=rst.getString(5);

    String service=rst.getString(6);

    pw.println(""+a+""+name+""+conn+""

    +desc+""+val+""+service+"");

    }

    }

    catch(Exception e){

    System.out.println("Error in connection");}

    %>

    BALANCE INFORMATION

    MTNL BROADBAND

    Page | 84

  • 8/3/2019 Website for Mtnl

    85/117







    Balance Information


  • 8/3/2019 Website for Mtnl

    86/117

    {System.out.println("Error in connection");

    }

    %>

    BILLING INFORMATION

    MTNL BROADBAND

    Page | 86

  • 8/3/2019 Website for Mtnl

    87/117

  • 8/3/2019 Website for Mtnl

    88/117

    }

    catch(Exception e)

    {

    System.out.println("Error in connection");}

    %>

    Account Mgt

    Package Info

    Contact us

    Logout

    Balance Info

  • 8/3/2019 Website for Mtnl

    89/117

    pu.println("usage Info");

    con.close();

    }

    catch(Exception e)

    {System.out.println("Error in connection");

    }

    %>







    Billing Information

  • 8/3/2019 Website for Mtnl

    90/117

    String amt=rst.getString(6);String status=rst.getString(7);

    String prob=rst.getString(8);

    pw.println("Accountno"+a+"Area"+area+"

    Delivery mode"+deli+"Bill

    Date"+date+"Billno"+bill+"Amount"+amt+"

    Status"+status+"Problem"+prob+"");

    }con.close();

    }

    catch(Exception e){

    System.out.println("Error in connection");}

    %>

    INSERTION

    package pack;

    import java.io.*;

    import java.sql.*;import javax.servlet.*;

    import javax.servlet.http.*;

    public class add extends HttpServlet

    {

    public void doPost(HttpServletRequest rq, HttpServletResponse rs)throws IOException,ServletException

    {

    PrintWriter pw=rs.getWriter();Connection con;

    String str,type,name,pass,date,email,address,plan;

    Page | 90

  • 8/3/2019 Website for Mtnl

    91/117

    int acc;

    long p,mob;

    try

    {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    con=DriverManager.getConnection("jdbc:odbc:mydsn","scott","tiger");

    Statement st=con.createStatement();

    acc=Integer.parseInt(rq.getParameter("tex1"));

    type=rq.getParameter("tex2");name=rq.getParameter("tex3");

    pass=rq.getParameter("tex4");

    date=rq.getParameter("tex5");p=Long.parseLong(rq.getParameter("tex6"));

    mob=Long.parseLong(rq.getParameter("tex7"));email=rq.getParameter("tex8");

    address=rq.getParameter("tex9");plan=rq.getParameter("tex10");

    str="insert into cust values("+acc+",'"+type+"','"+name+"','"+pass+"','"+date+"',"+p+","+

    mob+",'"+email+"','"

    +address+"','"+plan+"')";int rst=st.executeUpdate(str);

    System.out.println(rst);

    if(rst>=1)pw.println("Record Inserted");

    else

    pw.println("Record is not Inserted");

    }catch(Exception e)

    {

    System.out.println("OUT");

    }

    }

    }

    HOMEPAGE FOR ADMINISTRATOR

    Page | 91

  • 8/3/2019 Website for Mtnl

    92/117

    MTNL BROADBAND

    ADD

    CUST

    EMPLOYEE

    UPDATE

    CUSTEMPLOYEE

    DELETE

    CUSTEMPLOYEE

    VIEW USER

    AREAWISEPLANWISE

    VIEW BILL

    Page | 92

  • 8/3/2019 Website for Mtnl

    93/117

    BILL NO

    DELIVERY MODEAMOUNT WISE

    DISPUTED/UNDISPUTED

    VIEW EMPLOYEE

    DEPARTMENTWISE







    Admin Details

  • 8/3/2019 Website for Mtnl

    94/117

    pw.println("Account no"+a+"username"+user+"Creation

    Date"+date+"Phone"+phone+"=1)

    pw.println("Record deleted");else

    pw.println("Record is not deleted");

    }catch(Exception e)

    {

    System.out.println("OUT");}

    }

    }

    UPDATION

    package pack;

    import java.io.*;

    import java.sql.*;

    import javax.servlet.*;import javax.servlet.http.*;

    public class update1 extends HttpServlet{

    public void doPost(HttpServletRequest rq, HttpServletResponse rs)throws IOException,ServletExc

    {

    PrintWriter pw=rs.getWriter();Connection con;

    int acc;

    String type,name,pass,date,email,address,plan;long p,mob;

    try

    {

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");con=DriverManager.getConnection("jdbc:odbc:mydsn","scott","tiger");

    Statement st=con.createStatement();acc=Integer.parseInt(rq.getParameter("tex11"));

    ResultSet rst=st.executeQuery("select * from cust where account_no="+acc);

    if(rst.next()){

    acc=rst.getInt(1);

    Page | 101

  • 8/3/2019 Website for Mtnl

    102/117

    type=rst.getString(2);name=rst.getString(3);

    pass=rst.getString(4);

    date=rst.getString(5);

    p=rst.getLong(6);mob=rst.getLong(7);

    email=rst.getString(8);

    address=rst.getString(9);plan=rst.getString(10);

    pw.println("");

    pw.println("");

    pw.println("Account no");pw.println("Type");

    pw.println("User name");pw.println("Password");

    pw.println("Date");

    pw.println("Phone");

    pw.println("Mobile");pw.println("Email");

    pw.println("Address");

    pw.println("Plan name");

    pw.println("
    ");

    pw.println("");

    }

    elsepw.println("Record not found");

    }

    catch(Exception e){

    System.out.println("OUT");

    }

    }}

    DISPLAY OF RECORD TO BE UPDATED

    package pack;

    Page | 102

  • 8/3/2019 Website for Mtnl

    103/117

    import java.io.*;import java.sql.*;

    import javax.servlet.*;

    import javax.servlet.http.*;

    public class update2 extends HttpServlet

    {

    public void doPost(HttpServletRequest rq, HttpServletResponse rs)throws IOException,ServletExc{

    PrintWriter pw=rs.getWriter();

    Connection con;String str,type,name,pass,date,emai,addr,plan;

    int acc;

    long p,mob;try

    {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    con=DriverManager.getConnection("jdbc:odbc:mydsn","scott","tiger");Statement st=con.createStatement();

    acc=Integer.parseInt(rq.getParameter("tt1"));type=rq.getParameter("tt2");

    name=rq.getParameter("tt3");

    pass=rq.getParameter("tt4");date=rq.getParameter("tt5");

    p=Long.parseLong(rq.getParameter("tt6"));

    mob=Long.parseLong(rq.getParameter("tt7"));emai=rq.getParameter("tt8");

    addr=rq.getParameter("tt9");

    plan=rq.getParameter("tt10");

    str="update cust set account_no="+acc+",type='"+type+"',user_name='"+

    name+"',password='"+pass+"',create_date='"+date+"',phone="+p+",mobile="+mob+",email='"+emai"',address='"+addr+"',plan_name='"+plan+"' where(account_no="+acc+")";

    int rst=st.executeUpdate(str);

    System.out.println(rst);

    if(rst>=1)

    pw.println("Record Updated");else

    pw.println("Record is not updated");

    }catch(Exception e)

    {System.out.println("chunny");

    Page | 103

  • 8/3/2019 Website for Mtnl

    104/117

    System.out.println("OUT");}

    }

    }

    PAYMENT MODE WISE CUSTOMERS

    package pack;

    import java.io.*;

    import java.sql.*;

    import javax.servlet.*;import javax.servlet.http.*;

    public class delm extends HttpServlet

    {

    public void doPost(HttpServletRequest rq, HttpServletResponse rs)throws IOException,ServletException

    {

    PrintWriter pw=rs.getWriter();Connection con;

    String dr;

    try{

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    con=DriverManager.getConnection("jdbc:odbc:mydsn","scott","tiger");

    Statement st=con.createStatement();

    dr=rq.getParameter("tt1");

    ResultSet rst=st.executeQuery("select account_no from bill where delivery_mode='"+dr+"'");

    pw.println("");

    pw.println("");while(rst.next())

    {

    int accno=rst.getInt(1);

    ResultSet rest=st.executeQuery("select * from cust where account_no="+accno);

    Page | 104

  • 8/3/2019 Website for Mtnl

    105/117

    while(rest.next()){

    String type =rest.getString(2);

    String name=rest.getString(3);

    String pass=rest.getString(4);String date=rest.getString(5);

    long p =rest.getLong(6);

    long mob=rest.getLong(7);String emai=rest.getString(8);

    String addr=rest.getString(9);

    String plan=rest.getString(10);

    pw.println(""+accno+""+type+""+name+""+pass+""+date+""+p+""+mob+""+emai+""

    +addr+""+plan+"");}

    }pw.println("");

    }

    catch(Exception e){

    System.out.println("OUT");

    }}

    }

    HOMEPAGE FOR EMPLOYEE

    MTNL BROADBAND

    ADD

    UPDATE

    DELETE

    Page | 105

  • 8/3/2019 Website for Mtnl

    106/117

    VIEW USER

    AREAWISE

    PLANWISE

    VIEW BILL

    BILL NO

    DELIVERY MODEAMOUNT WISE

    DISPUTED/UNDISPUTED







    Employee Details

  • 8/3/2019 Website for Mtnl

    107/117

    String user=rst.getString(3);String date=rst.getString(5);

    String phone=rst.getString(6);

    String mobile=rst.getString(7);

    String email=rst.getString(8);String address=rst.getString(9);

    String plan=rst.getString(10);

    pw.println("Account no"+a+"user

    name"+user+"Creation

    Date"+date+"Phone"+phone+"Mobile"+mobile+"Email"+email+"

    Address"+address+"Plan"+plan+"");

    }con.close();

    }catch(Exception e)

    {System.out.println("Error in connection");

    }

    %>

    EMPLOYEE INFORMATION

    MTNL BROADBAND







    Employee Information


  • 8/3/2019 Website for Mtnl

    108/117

    Statement st=con.createStatement();

    ResultSet rst;

    pw.println(""+"Account no"+""+"Type"+""+"User name"+"""Password"+""+"Create Date"+""+"Phone"+""+

    "Mobile"+""+"Email"+""+"Address"+""+"Plan name"+"");

    rst=st.executeQuery("select * from cust where type='emp'");

    while(rst.next()){

    int a=rst.getInt(1);

    String type=rst.getString(2);String user=rst.getString(3);

    String pass=rst.getString(4);String date=rst.getString(5);

    long p=rst.getLong(6);long mob=rst.getLong(7);

    String email=rst.getString(8);

    String address=rst.getString(9);String plan=rst.getString(10);

    pw.println(""+a+""+type+""+user+""

    +pass+""+date+""+p+""+mob+""+email+""+address+""+plan+"");

    }}

    catch(Exception e)

    {

    System.out.println("Error in connection");}

    %>

    TESTING

    Page | 108

  • 8/3/2019 Website for Mtnl

    109/117

    No program or system is ever perfect; communication between userand designer is not always complete or clear and time is usually

    short. The result is errors. The errors must be eliminated before the

    system is ready for user acceptance. The main objective of testing i

    to systematically uncover as many errors as possible. The most

    severe defect of a software is one which can cause the program to

    fail to meet its requirements (from a costumers point of view). A

    good test is one, which is not redundant, and it is neither too simple

    nor too complex.

    Software testing accounts for a largest percentage of technical effor

    in software process. Testing is a set of activities that can be planned

    in advance and conducted systematically.

    For this purpose template for software testing, i.e., a set of steps int

    which specific test case design techniques and testing methods can

    be placed should be defined for software process.

    Testing- the process of exercising software to verify that it

    satisfies specified requirements and to detect faults; the

    measurement of software quality. Where the actualbehaviour of the system is different from the expected

    behaviour, a failure is considered to have occurred.

    Page | 109

  • 8/3/2019 Website for Mtnl

    110/117

    A failure is the result of a fault. A fault is an error in the

    programming or specification that may or may not result in

    a failure. A failure is the manifestation of fault.

    The principal aim of testing is to detect faults so that they

    can be removed before the product is made available to

    customers. Faults in software are made for a variety of

    reasons, from misinterpreting the requirements through to

    simple typing mistakes. It is the role of software testing and

    quality assurance, to reduce those faults by identifying the

    failures.

    Some of the testing are:

    System Testing

    System Testing is often the term given to group all types of

    testing that are performed against the system as a whole. So

    generally everything except for unit and integration testing.

    Unit Testing

    Page | 110

  • 8/3/2019 Website for Mtnl

    111/117

    The most micro scale of testing; to test particular

    functions or code modules. Typically done by the

    programmer and not by testers, as it requires detailedknowledge of the internal program design and code. Not

    always easily done unless the application has a well-

    designed architecture with tight code; may require

    developing test driver modules or test harnesses.

    Usability Testing

    Testing - testing for user-friendliness. Clearly this is

    subjective, and will depend on the targeted end-user or

    customer. User interviews, surveys, video recording of user

    sessions, and other techniques can be used. Programmers

    and testers are usually not appropriate as usability testers.

    Conformance Testing

    Verifying implementation conformance to industry

    standards. Producing tests for the behavior of an

    implementation to be sure it provides the portability,

    interoperability, and/or compatibility a standard defines.

    Functional Testing

    Page | 111

  • 8/3/2019 Website for Mtnl

    112/117

    Functional Testing the process of testing a system to verify

    that it meets the functional requirements.

    Integration Testing - Component

    Also referred to as Integration Testing in the Small.

    The testing of joined components of a system to determine

    if they function correctly together. Components in this

    sense are modules or units of code within the same system.

    An example may be the integration of a shopping basket

    component with a web component. Component IntegrationTesting is likely to focus on the two components operating

    correctly as a single solution.

    User Aceptance Testing

    User Acceptance Testing is the final stage of validation; it

    usually occurs just prior to the final sign off and is

    generally performed by users, not technical staff. The isprocess of verifying that the system under test (SUT) meets

    the customers/users needs and focuses on building

    confidence in the system, using business related scenarios.

    When at all possible, the customer should perform, or be

    closely involved during, this stage of testing. The customer

    should use the product in a realistic way in an environment

    similar to the operation environment, carrying out realisticbusiness processes.

    MAINTENANCE

    Page | 112

  • 8/3/2019 Website for Mtnl

    113/117

    There are two goals of Maintenance in SDLC: Increase theability of the software and avoidance of failures.

    Better Adaptability of the Software SDLCs idea of

    maintenance is very beneficial not only to the developers

    but also for the software itself. With the use of available

    data, developers will learn something new. In thisaccount, they will be able to apply this knowledge to the

    software.

    Although any developer would not wish for a problem, it

    poses a great opportunity to learn more about the industry

    and release updates to combat problems once and for all.

    The end result of constant updates will be a better software

    that can adapt to the changing environment. When a

    business spends thousands of dollars on project

    development, they expect more from the software.

    Maintenance will ensure that the software will last for a

    very long time.

    Avoidance of Failures Maintenance does not only ensure

    that the problem will be fixed but maintenance shouldPage | 113

  • 8/3/2019 Website for Mtnl

    114/117

    prevent the same event from happening again. Software

    will always have that learning property as long as they

    are handled well by the developers. Developers will oftenwork on the problem and at the same time give updates on

    the system to prevent failures. It is essential for developers

    to release updates especially if the software is an important

    part of the business.

    Page | 114

  • 8/3/2019 Website for Mtnl

    115/117

    CONCLUSION

    This project is designed to meet the requirements of a

    Telecom Company. It has been developed in Java and the

    database has been built in Oracle 9i with Weblogic as

    server, keeping in mind the specifications of the system.

    For designing the system we have used simple servlet and

    jsp files.

    Overall the project teaches us the essential skills like:

    1. Using system analysis and design techniques.

    2. Understanding programming logic in Html coding.

    Page | 115

  • 8/3/2019 Website for Mtnl

    116/117

    FUTURE PROSPECTS

    This project can be enhanced by giving SMS and

    email facilities to customers whenever his bill is

    ready.

    Page | 116

  • 8/3/2019 Website for Mtnl

    117/117

    BIBLIOGRAPHY

    1. Java 2 Complete Reference

    (Herbert Schildt)

    3. Oracle Database 9i

    (Jason Price)