Project work submitted in partial fulfillment of the requirement for the award of degree of





Associate Professor Dept. of Computer Science & Engineering

Department of computer Science & Engineering

(Affiliated to J.N.T.U., Hyderabad)





This is to certify that Project Report entitled “UNIVERSAL BROWSER” is the bonafide work done by S.RAVI KIRAN, CH.PRAVEEN KUMAR, G.PRITHVI RAJ , G.RAVI PRAKASG REDDY, M.RAKESH in the partial fulfillment of requirements for the Award of the Degree of BACHELOR OF TECHNOLOGY IN COMPUTER SCIENCE & ENGINEERING.




The satisfaction and excitement that Accompanies the successful completion of any task would be incomplete without mentioning the people who made it possible, because success is the essence of hard work, perseverance, undeterred missionary Zeal, persistent determination and most all

“ENCOURANGING GUIDANCE”. We express our gratitude to our institution chairman Dr.P.Narayana garu, “NARAYANA ENGINEERING COLLEGE” Nellore. We are deeply indebted to Dr.P.Gopal Reddy garu, Principal for his benevolent good suggestion that motivated us to do our project and also for his continuous support in accomplishing the requirement that fulfill the completion of project. We are extremely grateful to our beloved Head of the Department, Computer science & Engineering Mr. K.C.Krishnaiah garu for providing us means of attaining our most cherished goals. Our heartfelt thanks and gratitude to our guide Asst.professor Mr.K.C.Krishnaiah garu for providing us an opportunity to carry out this project, along with the purposeful guidance and moral support extended to us throughout the duration of the project work.

Eventually we are grateful to our lab technicians and number of individuals whose professional guidance, assistance and encouragement have made it a pleasant endeavor to undertake this project.

The Browser we normally use such as “internet Explorer” and “Netscape” is generally limited by the capability with the number of servers it can communicate. It cannot be possible to communicate with FTP server using “Internet Explorer” and “Netscape”. Also it also lacks the ability to store “Text Files” in server address space. To overcome the above difficulties we are intended to develop a project which can efficiently handled the above requirements, using JAVA technology. Our project basically consists of 3 modules.

1) E-cabinet Module:
This module provides the facility to store text files in the server address space in the intended user’s login. This module is implemented using JAVA “Socket “ and “Server Socket” classes.


HTTP Module:
This module provides the basic navigator function to navigate over

the “web pages”. Also it consists of several sub-modules, which provides all the basic functionalities that we normally encountered in “Internet Explorer”. 3) FTP Module: This Module makes it possible to communicate with the FTP server. Once we connect to the FTP server we can perform the basic “UpLoading” and “DownLoading” operations with FTP server.

In the present world, communication has become more of a necessity for the people all over the world. The evolution of the Internet made it possible for people all over the world communicate with one another irrespective of their location. The revolution of World Wide Web made it possible for people all over to access to the information available on World Wide Web with just a mouse click. There are several browsers that make the user access to web pages present in several web servers across the Internet. There are some browsers that are able to communicate with ftp servers and allow 2-way file transfer. The thought of combining the functionalities of both these browsers into a single browser lead us to create this universal browser.

The Browser we normally use such as “internet explorer “ or “Netscape” is generally limited by the capability with the number of servers in it can communicate to. For example it could be not able to communicate with FTP server when considering Internet Explorer or Netscape. Also when considering

these clients with FTP scheme they normally lack the ability to support for uploading files to the server. Another most important feature is to store and retrieve information in the most efficient, easy, and timesaving manner. There are many software which have been developed across cyberspace and networks in order to store data in files as well as retrieve these files as and when needed or desired. There are situations where a person may be connected to the Internet or the World Wide Web through his personal computer. It is not unreasonable to expect such a person to also travel a lot, in which case, he does not enjoy the

luxury of having ready gigabytes at his disposal. Of course, the onset of laptops and palmtops surely do provide this facility but not all people can afford them. Hence, our discussion converges to this point also: “that people need a hard disc or at least a miniature hard disc in cyberspace where they can store their important text files and can access these files from any place in the world”, provided they are connected to the Internet.

This project is an effort to update the existing system by developing a browser that communicates with all WEB SERVERS on the WORLD WIDE WEB (to process HTTP requests) and can also communicate with FTP SERVER for mutual file transfer. Along with these an additional functionality called E-CABINET is incorporated so that users can store and retrieve their personal files under their login by registering some server space on a network. To achieve the above-mentioned requirements we need a platform independent client and hence we extensively used JAVA, a platform independent language for the project. Our aim is to develop a

multipurpose platform independent client with the ability to support HTTP, FTP servers and has the additional feature of E-CABINET.

2.1 About JAVA Swing:
Generally a Graphical User Interface presents a pictorial interface to a program. A GUI gives a program a distinctive look and feel by providing different applications with a consistent set of intuitive user interface components. GUIs allow the user to spend less time trying to remember which keystroke sequences do what and spend more time using the program in a productive manner. GUIs are built from GUI components. A GUI component is an object with which the user interacts via the mouse or the keyboard .The classes that are used to create the GUI components are part of the SWING GUI components from package javax.swing. The original GUI components from the Abstract Windowing Toolkit package java.awt are tied directly to the local platform’s graphical user interface capabilities. So a JAVA program executing a different JAVA platform has a different appearance and sometimes even different user interactions on each platform. These

are the newest GUI components of the JAVA 2 platform. Swing components are written, manipulated and displayed completely in JAVA and are so-called pure java components. Swing components are often referred to as “light-weight components”. They are written completely in JAVA so they are not “weighed down” by the complex GUI capabilities of the platform on which they are used. AWT components that are tied to the local platform’s windowing system to determine their functionality and their look and feel .The GUI we designed to implement our Browser using the swing components is as shown



Tool Bar

Editor Pane

Layout Managers:
Layout managers are provided to arrange GUI components on a container for presentation purpose. The layout managers provide basic layout

capabilities that are easier to use than determining the exact position and size of every GUI component. This enables the programmer to concentrate on the basic “look and feel” and lets the layout managers process most of the layout details.

Flow Layout:
Flow Layout is the most basic layout manager. GUI components are placed on a container from left to right in the order in which they are added to the container. When the edge of the container is reached, components are continued on the next line. Class Flow Layout allows GUI components to be left aligned, centered and right aligned

Border Layout:
The BorderLayout layout manager arranges the components into five regions: north, south, center, east, west. A max of 5 components can be added directly to the BorderLayout – one for each region. The components placed in the North and South regions extend horizontally to the sides of the container and are as tall as the components placed in those regions. The East and West regions expand vertically between the North and South regions and are as wide as the components placed in those regions. The component placed in the Center region expands to take all remaining space in the layout.

The GridLayout layout manager divides the container into a grid so that components can be placed in rows and columns. Class GridLayout inherits directly

from OBJECT and implements interface LayoutManager. Every Component in a GridLayout has the same width and height. Components are added to a GridLayout

starting at the top-left cell of the grid and proceeding left-to-right until the row is full. Then the process continues left-to-right on the next row of the grid.

Complex GUI requires that each component be placed in an exact location. They often consist of multiple panels with each panel’s components arranged in a specific layout. Panels are created with class Jpanel. Jpanel’s may have components including other panels added to them.

Using Menus with Frames:
Menus are an integral part of GUIs. Menus allow the user to perform actions without unnecessarily “cluttering” a graphical user interface with extra GUI components. In swing GUIs menus can only be attached to objects of the classes that provide method setJMenuBar. Two such classes are JFrame and JApplet. The classes used to define menus are JMenuBar, JMenuItem, and JMenu. “Class JMenuBar contains the methods necessary to manage a menubar. A menubar, which is a container for menus”. “Class JMenuItem contains the methods necessary to manage menu items. A menu item is a GUI component inside a menu that when selected causes an action to be performed. A menu item can be used to initiate an action or it can be a submenu that provides more menu items from which the user can select.” “Class JMenu contains the methods necessary to manage menus. Menus contain menu items and are added to menu bars or to other menus as submenus. When a menu is clicked, the menu expands to show its list of menu items. Clicking a menu item generates an action event”.


Menu Item


Using JPopupMenus:
Many of today’s computer applications provide so-called context-sensitive popup menus. In Swing, such menus are created with class JpopupMenu.These menus provide options that are specific to the component for which the popup trigger event was generated. The popup trigger event occurs when the user presses and releases the right mouse button.

Popup Menu

Using JDesktopPane and JInternalFrame:
For any application the only way a user can view the visibility of the application through its GraphicalUserInterface.Many applications use a multiple document interface containing other windows to manage several open documents that are being processed in parallel. For example the mail option in Internet Explorer can be viewed as a multiple document interface. JAVA Swing technology provides this MDI format through its two most important classes. JDesktopPane JInternalFrame These two classes provide the support for creating multiple document interfaces. Constructor for creating the desktop object is as follows Final JDesktopPane JD = new JDesktopPane () This desktop object will act as a Parent Window. Any child windows that are created will be added to this desktop object. For any application there can be any number of child windows but there must be exactly one parent window. Child windows can be created using the class “JInternalFrame”. The constructor for creating Internal frames is JInternalFrame frame = new JInternalFrame (“Child Frame”, true, true, true, true) The constructor consists of five arguments. First argument in the constructor indicates the name of this internal frame. Second argument is a Boolean indicating if the internal frame should be resizable by the user. Third argument is a Boolean indicating if the internal frame should be closable by the user. Fourth is also a Boolean indicating if the internal frame should be maximizable by the user. Fifth is last Boolean argument indicating if the internal frame should be minimizable by the user. A JInternalFrame has a content pane to which components can be attached. The method used for obtaining the content pane is

“getContentPane ()”.

The BoxLayout layout manager arranges the GUI components horizontally along the X-axis or vertically along the Y-axis of a container. Box Box Box Box bxAddrBar bxNorth bxCenter bxSouth = = = = new Box (BoxLayout.X_AXIS); new Box (BoxLayout.Y_AXIS); new Box (BoxLayout.X_AXIS); new Box (BoxLayout.X_AXIS);

Here “bxAddrBar”,”bxNorth “, “bxCenter”,”bxSouth” are the “BOX” containers that uses BoxLayout as its default layout manager. The first container uses “BoxLayout.X_AXIS” as its layout manager. This means that the components are arranged in horizontal fashion from left to right Similarly the second container uses “BoxLayout.Y_AXIS” as its layout manager. This means that the components are arranged from top to bottom in vertical fashion. Similarly the third and fourth containers uses “Horizontal” layout’s as its layout managers Basically this Container splits the InternalFrame into Boxes. Each Box can have it’s own layout manager. Each component will be added in sequential fashion either in horizontally or vertically.These BOX containers are used for arranging the components in regular fashion. Once the components are added to these containers this containers can be added to Internal Frames.

With the JTree class, you can display hierarchical data. A JTree object doesn't actually contain your data; it simply provides a view of the data. Like any non-trivial Swing component, the tree gets data by querying its data model. Here's a picture of a tree:

As the preceding figure shows, JTree displays its data vertically. Each row displayed by the tree contains exactly one item of data, which is called a node. Every tree has a root node from which all nodes descend. By default, the tree displays the root node, but you can decree otherwise. A node can either have children or not. We refer to nodes that can have children — whether or not they currently have children — as branch nodes. Nodes that can't have children are leaf nodes. Branch nodes can have any number of children. Typically, the user can expand and collapse branch nodes — making their children visible or invisible — by clicking them. By default, all branch nodes except the root node start out collapsed. This JTree has been used in our project to display the list of URL’s that have visited in the form of an Hierarchical way.

2.2 About JAVA NET Package:
SOCKET OVERVIEW: A network socket is a lot like an electrical socket. Various plugs around the network have a standard way of delivering their payload. Anything that understands the standard protocol can “plug in “ to the socket and communicate. A server is anything that has some resource that can be shared. A client is simply any other entity that wants to gain access to a particular server. The

server is a permanently available resource where as a client is free to “unplug “ after it has been served. A port is a numbered socket on a particular machine. A server

process is said to “LISTEN” to a port until a client connects to it. For FTP default port number is 21 where as for HTTP it is 80.The-networking classes mainly used in this software design are InetAddress, URL, Socket, ServerSocket, SocketImpl. InetAddress: The InetAddress class is used to encapsulate both the numerical IP address and the domain name for that address. We interact with this class by using the name of IP host, which is better than the numerical address. This class hides the number inside. URL: The URL provides a reasonably intelligible form to uniquely identify or address information on the Internet. The URL specification is based on four components. First one is protocol to use, second one is host name or IP address, third one is port number, which is optional, and last one is actual file path. This class has several constructors and each can throw a MalformedURLException. Those are URL (String urlspecifier) URL (String protocol Name, String hostname, int port, String path) URL (String protocol Name, String hostname, String path) SERVER SOCKET: This class is used to create servers that listen for either local or remote client programs to connect to them on published ports. This section develops the operational web server. When we create a server socket it will register itself with the system having an interest in client connections. The constructors for this class reflect

the port number that we wish to accept connections on and, optionally, how long we want the queue for said port to be.

The constructors are ServerSocket (int port) creates server socket on the specified port with a queue length of 50. ServerSocket (int port, int marquee) creates a server socket on the specified port with a maximum queue length of 50. ServerSocket (int port, int maxqueue, InetAddress local address) same as above and on a multithreaded host local address specifies the IP address to which this socket binds.

2.3 About IO Package:
CHARACTER STREAMS: The byte stream classes provides functionality to handle any type of I/O operation, they cannot work directly with Unicode characters. So it was necessary to include direct I/O support for characters. The main classes used here are Reader, Writer, File Reader, and File Writer. READER: Reader is an abstract class that defines java’s model of streaming character input. All the methods in this class will throw an IOException on error conditions. Read (char buffer [ ]) method is used in the reader class. This method attempts to read up to buffer. Length characters into buffer and returns the actual number of characters that were successfully read. -1 is returned when end of file is encountered. WRITER:

Writer is an abstract class that defines streaming character output. All the methods in this class return a void value and throw an IOException in case of errors. The methods used that belongs to this class are write (char ch), write (char buffer [ ]). The first method writes a single character to the

invoking output stream. Second one writes a complete array of characters to the invoking output stream. FILE READER: The FileReader class creates a Reader that we can use to read the contents of a file. The constructors are FileReader (String filepath) FileReader (File fileobj) Either can throw a FileNotFoundException. Here file path is a full path name of a file and fileobj is a File object that describes the file. FILEWRITER: FileWriter creates a Writer that we can use to write to a file. The constructors are shown here. FileWriter(String filepath) FileWriter(String filepath,Boolean append) FileWriter(File fileobj) They can throw IOException. Here filepath is the full path name of a file. Fileobj is a File object that describes the file. If append is true then output is appended to the end of file.FileWriter will create the file before opening it for output when you create the object. In case where you attempt to open a redonly file an IOException will occur. File:

The file class does not operate on streams it deals directly with files and filesystem. It does not specify how it is retrieved from or store in files, it describe the properties of the file itself. A file object is used to manipulate or obtain int associated with a disk file and to navigate subdirectory hierarchies.

Files are a primary source id destination for data. There are central resources for storing persistent and shared int. The Constructors are shown here: File (string directorypath) File (string directorypath,string Filename) File (dir obj, string Filename) Methods in a file Getname( ) returns the name of the file GetParent( ) returns name of parent directory Exists( ) returns true if file exists File includes two verbal utility methods Boolean RenameTo(file newname) Here the filename specified by “newname” becomes the name of the involving file object .it will be return true upon success. Boolean delete( ) Which deletes the disk file. File is represented by the path of the involving FILE object. It is also used to delete a directory when it is empty.


It implements a dynamic array. It is similar to array list but with two differences. The vector is synchronized, and it consists many legacy methods. Those are not part of the collection framework. In java2 vector was reengineered to extend abstract list and implement the list interface. Now it is computable with collections.

All vectors start with an initial capacity. After this initial capacity is reached, the next time that you attempt to store an object in the vector, the vector automatically allocates space for that object plus extra room for add1 object. By allocation more than required no of vectors the no of allocations made to be reduced. Vector defines these protected data members. Int capabilityIncrement; stores the increment value. Int element counts; counts no of elements. Object elementdata [ ]; stores the array that holds the vector. After you initiate a vector, you can add element to it by calling addelement ( ). To obtain the element at a specific location call elementAt ( ). To obtain the first element in the vector call firstelement ( ). To ret rive the last element call lastelement ( ). You can obtain the index of an element by using indexof ( ) and lastindexof (). To remove an element, call removeelement ( ) or removeelementat ( ). 2.STRING TOKENIZER: It provides the 1st step in the parsing process. Often called lexical analysis or scanner. This class implements the enumeration interface. Therefore, given a string, you can enumerate the individual tokens contained in it using string tokenizer.

To use this we have to specify the input string that contains delimiters. Delimiters are characters that separate tokens. For example ( ; : ).sets delimiters to comma, semicolon, colon. The default set of delimiters consists of the white space characters space, tab, new line and carriage return.

In this the next token () method is used to extract consecutive tokens. Hasmoretokens ( ) method returns true while there are more tokens to be extracted. It implements the next element and has more elements () method also. It is used to show the tokens one by one. Methods are Stringtokenizer (string str) Stringtokenizer (string str, string delimiter) Stringtokenizer (string str, string delimiter, boolean delimiterstoken)

3.1 Problem specification
Vision: The problem is “to design a browser that has the functionalities of i) Communicating with web servers on the world wide web ii) Communicating with ftp servers over the web for mutual file transfer iii) Providing a virtual address space on the server for registered users”

3.2 Systems Specification
The hardware and software requirements for our software are listed below:

 Hardware specification
• • • • • • Processor Specification: Pentium III


128 MB (min 64 MB)

Hard Disk:

40 GB (min 2 GB)


14 inches

Key Board:




 Software specification: • •

Operating system: Windows 2000 Front end : JAVA

3.3 Feasibility Study
Feasibility study is necessary to determine whether the proposed system is feasible considering technical, operational and economical factors. It is both necessary and prudent to evaluate the feasibility of a project at the earliest possible time. This study decides whether to continue with the project at the initial stage.

The proposed system entails a minimum basic knowledge of the computer system on part of the user. The user friendly, easy to use interfaces encourages user to adapt to the system. The maintenance of the system requires minimum of efforts. The present system is not an exe file supported by windows. The software works only in the presence of JDK1.3 STANDARD EDITION, which supports SWING, UTIL, IO, NET packages. In view of the above, the software is operationally feasible. TECHNICAL FEASIBILITY: In the present system, the GUI is user friendly and does not require must expertise and training. It just needs a mouse click to perform any function. The system is implemented using java 1.3 on windows 2000 operating system. This project mostly uses swing components to

design the Graphical User Interface which is provided by Java Foundation classes. A client to server connection is to be established. The required site is to be accessed based on the URL address of the site. Java.Net package is mostly used.

The development of the system needs minimum amount of cost on part of the developer .The project is developed entirely using JAVA hence there is no constraints of mixing various languages. Also there is no need of a backend for our project, which makes it economically viable. The maintenance cost is also less. The proposed system doesn’t need additional procurement of software or hardware for its development, as they are readily available. Hence the project is economically feasible.

3.4 System Analysis
3.3.1 E-cabinet Module
Introduction :
This project is a software designed to run on a LAN network, which can be extended to the Internet, using which a small amount of disc space on the server machine is allocated to each client who signs up for the service. To achieve this, the software has been coded in Java so that a wide range of software tools is available for implementation. As the basic concept is that clients store their data on disc space of the server, a basic networking model has to be followed. For this purpose the Java packages java.net has been used. The Socket class and the Server Socket class provide the necessary framework to base this software. In addition, in order to give the user maximum ease to operate the software, a graphical user interface has been provided. For this reason, extensive use has been made of the packages Java.awt, Java. net, Java.io, Javax.swing. In order to attain compatibility with the mouse, as users tend to be biased towards the mouse, the package Java.awt.event has been used to trap and respond to mouse events. The package Javax.swing is a feature of the extended version in Java 2.0. The package Java.io is used for file management in the software. The package Java.util has been used extensively. The software

consists of two programs namely the Server and the Client. The Server is a java application program while the Client is a java applet. Thus, the Client program uses the java.Net package for its running. As the software is meant to serve many clients at the same time, and the service be provided by only a single server, the essential criterion is that multithreading be used. Thus for each client request the server spawns

a thread to take care of the execution of that client. Multithreading is achieved using the versatile Thread class in conjugation with the Runnable interface. The software uses the Vector data structure to have an exchange of information over the network between the Server and each instance or thread of a client. In essence, the Java Virtual Machine uses the TCP/IP protocol when it uses the Socket and the Server Socket class, so the software implicitly uses the TCP/IP protocol for its implementation.

Overview Of The Software:
The software is implemented by dedicating a computer as well as its hard disk to the server. The server program runs continuously and waits for a connection to be established by a client with it. This means that the server listens for incoming connections at a particular port. In the program, the server listens for the connections at the port 1055. When a client is run using the appletviewer of the Java Development Kit an applet is run at the client terminal. The client first informs the server of its connection. In response the server spawns a thread for all execution related to the client. If many clients establish connections and thereafter execute concurrently, many threads are spawned in parallel. These threads run independent of one another and so the concept of multithreading is central to the software.

Once the client starts, it offers the user the choice to sign up if he has not previously created a login. Once the user logs in, the password is matched at the server side and if it matches the two buttons to Read and Save files get activated. Now one can save one’s files by merely clicking on Save and then choose one’s file through the file dialog box. If one wants to read the files one has stored in her login, she needs to click on the Read button whereupon the server sends the list of files currently in her login. In addition,

buttons are provided to either open, rename or delete the file as per the user’s requirement. When the window of the applet is closed, the applet gets destroyed. But before getting destroyed, the program closes all the open sockets of the thread which produced the applet. When the server frame is closed, the server socket gets closed and hence no more listens for incoming connections. At this stage if there is a request from a client the message is displayed that there is no Network Connection.

3.3.2 FTP Module:
The ability to transfer files from one machine to another is often accomplished using an FTP client. In order to achieve the desired functionality we have extensively used the predefined classes provided by JAVA programming language. JAVA provided soo many builtin functions that provided the basic functionalities of the FTP client FTP stands for File Transfer Protocol. It is a universal protocol (set of rules and commands) that is used between two computers to transfer files. Since the Protocol is universal the file transfer can be done between PC, Mac, Unix or any other prehistoric machine. The objectives of FTP are

1. to promote sharing of files (computer programs and/or data) 2. to encourage indirect or implicit (via programs) use of remote computers 3. to shield a user from variations in file storage systems among hosts 4. to transfer data reliably and efficiently. FTP, though usable directly by a user at a terminal, is designed A full duplex

mainly for use by programs. The communication path between the USER-PI and SERVER-PI is used for the exchange of commands and replies. connection over which data is transferred, in a specified mode and type.

The data transferred may be a part of a file, an entire file or a number of files. The path may be between a server-DTP and a user-DTP, or between two serverDTPs. The passive data transfer process "listens" on the data port for a connection from the active transfer process in order to open the data connection.

FTP is a protocol that manages files on a remote machine. It has commands for copying files to and from remote machine and for renaming and deleting files. You have to first make a connection to the remote server. Then you will be able to download or upload files. You will feel as if you are directly working on the other machines. There is no need to worry about the security. Don’t think FTP will also allow others to connect to the same remote system and download your files. It protects access by user name and password combinations as is done on most of today’s systems. But it also has a form called “ANONYMOUS FTP”. Here username “ANONYMOUS” is recognized as valid without any password. Assume that you have some technical stuff in your system and you wish to provide that to others. Then in normal FTP you should have given username and password to all those who wish to take your services. It is

also boring for both of you if others are going to take the information only once. Others should ask you for a login id and password and you have to assign them. They will throw away their id after use but your server still maintains them in the user list. In such occasions you will find “ANONYMOUS FTP” useful. They will just login as ANONYMOUS and the system will not ask for any password they can take the free stuff from your server. Here the users will have only limited access. The secured exchange of files in FTP consists of the following steps.

1. Opening a connection to the remote computer and identification of the user. 2. File exchange (Get or Put file). 3. Closing the connection. FTP allows exchange of all types of files with 2 settings. ASCII for simple text files and Binary for files like Word Processor documents, Graphics, Video, Audio or executable files that contain special character codes. FTP has a list of commands similar to DOS like dir, cd etc… The data transfer process establishes and manages the data connection. The DTP can be passive or active. Access controls define users' access privileges to the use of a system, and to the files in that system. Access controls are necessary to prevent unauthorized or accidental use of files. It is the prerogative of a server-FTP process to invoke access controls. Pathname is defined to be the character string, which must be input to a file system by a user in order to identify a file. Pathname normally contains device and/or directory names, and file name specification. FTP does not yet specify a standard pathname convention.

Each user must follow the file naming conventions of the file systems involved in the transfer. The data transfer process, in its normal "active" state, establishes the data connection with the "listening" data port.It sets up parameters for transfer and storage, and transfers data on command from its PI. The DTP can be placed in a "passive" state to listen for, rather than initiate a connection on the data port. server-FTP process A process or set of processes which perform the function of file transfer in cooperation with a user-FTP process and, possibly, another server. The functions consist of a protocol interpreter (PI) and a data transfer process (DTP).

server-PI The server protocol interpreter "listens" on Port L for a connection from a user-PI and establishes a control communication connection. It receives standard FTP commands from the user-PI, sends replies, and governs the server-DTP. type The data representation type used for data transfer and storage. Type implies certain transformations between the time of data storage and data transfer. The representation types defined in FTP are described in the Section on Establishing Data Connections.


Files are transferred only via the data connection. The control connection is used for the transfer of commands, which describe the functions to be performed, and the replies to these commands (see the Section on FTP Replies). Several commands are concerned with the transfer of data between hosts. These data transfer commands include the MODE command which specify how the bits of the data are to be transmitted, and the STRUcture and TYPE commands, which are used to define the way in which the data are to be represented. The transmission and representation are basically independent but the "Stream" transmission mode is dependent on the file structure attribute and if "Compressed" transmission mode is used, the nature of the filler byte depends on the representation type. When the data reaches the receiving host, it will be transformed in a manner dependent on the logical byte size and the particular


This transformation must be

invertible (i.e., an identical file can be

retrieved if the same parameters are used) and should be well publicized by the FTP implementors. For example, a user sending 36-bit floating-point numbers to a host with a 32-bit word could send that data as Local byte with a logical byte size of 36. The receiving host would then be expected to store the logical bytes so that they could be easily manipulated; in this example putting the 36bit logical bytes into 64-bit double words should suffice. In another example, a pair of hosts with a 36-bit word size may send data to one another in words by using TYPE L 36. The data would be sent in the 8-bit transmission bytes packed so that 9 transmission bytes carried two host words.

The types ASCII and EBCDIC also take a second (optional) parameter; this is to indicate what kind of vertical format control, if any, is associated with a file. The following data representation types are defined in FTP: A character file may be transferred to a host for one of three purposes: for printing, for storage and later retrieval, or for processing. If a file is sent for printing, the receiving host must know how the vertical format control is represented. In the second case, it must be possible to store a file at a host and then retrieve it later in exactly the same form. Finally, it should be possible to move a file from one host to another and process the file at the second host without undue trouble. A single ASCII or EBCDIC format does not

satisfy all these ditions. Therefore, these types have a second parameter specifying one of the following three formats:

The mechanics of transferring data consists of setting up the data connection to the appropriate ports and choosing the parameters for transfer. Both the user and the server-DTPs have a default data port. The userprocess default data port is the same as the control connection port (i.e., U). The server-process default data port is the port adjacent to the control connection port (i.e., L-1).

The transfer byte size is 8-bit bytes. This byte size is relevant only for the actual transfer of the data; it has no bearing on representation of the data within a host's file system. The passive data transfer process (this may be a userDTP or a second server-DTP) shall "listen" on the data port prior to sending a transfer request command. The FTP request command determines the direction of the data transfer. The server, upon receiving the transfer request, will initiate the data connection to the port. When the connection is established, the data transfer begins between DTP's, and the server-PI sends a confirming reply to the user-PI. Every FTP implementation must support the use of the default data ports, and only the USER-PI can initiate a change to non-default ports.

It is possible for the user to specify an alternate data port by use of the PORT command. The user may want a file dumped on a TAC line printer or retrieved from a third party host. In the latter case, the user-PI sets up control connections with both server-PI's. One server is then told (by an FTP command) to “listen" for a connection which the other will initiate. The user-PI sends one server-PI a PORT command indicating the data port of the other. Finally, both are sent the appropriate transfer commands. The exact sequence of commands and replies sent between the user-controller and the servers is defined in the Section on FTP Replies.

In general, it is the server's responsibility to maintain the data connection--to initiate it and to close it. The exception to this is when the user-DTP is sending the data in a transfer mode that requires the connection to be closed to indicate EOF. The server MUST close the data connection under the following conditions:

1. The server has completed sending data in a transfer mode that requires a close to indicate EOF. 2. The server receives an ABORT command from the user . 3. The port specification is changed by a command from the user. 4. The control connection is closed legally or otherwise. 5. An irrecoverable error condition occurs.

Otherwise the close is a server option, the exercise of which the server must indicate to the user-process by either a 250 or 226 reply only.

All FTP implementations must support use of the default data connection ports, and only the User-PI may initiate the use of non-default ports.

Negotiating Non-Default Data Ports:The User-PI may specify a non-default user side data port with the PORT command. The User-PI may request the server side to identify a non-default server side data port with the PASV command. Since a connection is defined by the pair of addresses, either of these actions is enough to get a different data connection, still it is permitted to do both commands to use new ports on both ends of the data connection. Reuse of the Data Connection: When using the stream mode of data transfer the end of the file must be indicated by closing the connection. This causes a problem if multiple files are to be transfered in the session, due to need for TCP to hold the connection record for a time out period to guarantee the reliable communication. reopened at once. There are two solutions to this problem. The first is to negotiate a non-default port. The second is to use another transfer mode. Thus the connection can not be

The communication channel from the user-PI to the server-PI is established as a TCP connection from the user to the standard server port. The user protocol interpreter is responsible for sending FTP interprets commands and interpreting the replies received; the server-PI

commands, sends replies and directs its DTP to set up the data connection and transfer the data. If the second party to the data transfer (the passive transfer

process) is the user-DTP, then it is governed through the internal protocol of the user-FTP host; if it is a second server-DTP, then it is governed by its PI on command from the user-PI. The FTP replies are discussed in the next section. In the description of a few of the commands in this section, it is explicit about the possible replies. helpful to be

USER NAME The argument field is a string identifying the user. The user identification is that which is required by the server for access to its file system. This command will normally be the first command transmitted by the user after the control connections are made (some servers may require this). Additional identification information in the form of a password and/or an account command may also be required by some servers. Servers may allow a new USER command to be entered at any point in order to change the access control and/or accounting information. This has the effect of flushing any user, password, and account information already supplied and beginning the login

sequence again. All

transfer parameters are unchanged and any file transfer

in progress is completed under the old access control parameters. PASSWORD The argument field is a Telnet string specifying the user's password. This command must be immediately preceded by the user name command, and, for some sites, completes the user's identification for access

control. Since password

information is quite sensitive, it is desirable in

general to "mask" it or suppress typeout. It appears that the server has no foolproof way to achieve this. It is therefore the responsibility of the user-FTP process to hide the sensitive password information. CHANGE WORKING DIRECTORY This command allows the user to work with a different directory or dataset for file storage or retrieval without altering his login or accounting information. group designator. Transfer parameters are similarly unchanged. The argument is a pathname specifying a directory or other system dependent file

All data transfer parameters have default values, and the commands specifying data transfer parameters are required only if the default parameter values are to be changed. The default value is the last specified value, or if no value has been specified, the standard default value is as stated here. This implies that the server must "remember" the applicable default The following commands specify data transfer values. The commands may be in any order except that they must precede the FTP service request. parameters:

DATA PORT The argument is a HOST-PORT specification for the data port to be used in data connection. There are defaults for both the user and server data ports, and under normal circumstances this command and its reply are not needed. If this command is used, the argument is the concatenation of a 32-bit internet host address and a 16-bit TCP port address. This address

information is broken into 8-bit fields and the value of each field is transmitted as a decimal number (in character string representation). The fields are separated by commas. DELETE This command causes the file specified in the pathname to be deleted at the server site. If an extra level of protection is desired (such as the query, "Do you really wish to delete?"), it should be provided by the user-FTP process. REMOVE DIRECTORY This command causes the directory specified in the pathname to be removed as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative MAKE DIRECTORY This command causes the directory specified in the pathname to be created as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative). See Appendix II.

PRINT WORKING DIRECTORY This command causes the name of the current working directory to be LIST returned in the reply.

This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or transfer is over the data default directory. The data connection in type ASCII or type EBCDIC. (The

user must ensure that the TYPE is appropriately ASCII or EBCDIC). Since the information on a file may vary widely from system to system, this information may be hard to use automatically in a program, but may be quite useful to a human user.

3.3.3 HTTP Module:
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990. The first version of HTTP, referred to as HTTP/0.9, was a simple protocol for raw data transfer across the Internet. HTTP/1.0, as defined by RFC 1945 , improved the protocol by allowing messages to be in the format of MIME-like messages, containing meta information about the data transferred and modifiers on the request/response semantics. However, HTTP/1.0 does not

sufficiently take into consideration the effects of hierarchical proxies, caching, the need for persistent connections, or virtual hosts. In addition, the proliferation of incompletely implemented applications calling themselves "HTTP/1.0" has

necessitated a protocol version change in order for two communicating applications to determine each other's true capabilities. This specification defines the protocol referred to as "HTTP/1.1". This protocol includes more stringent requirements than HTTP/1.0 in order to ensure reliable implementation of its features. Messages are passed in a format similar to that used by Internet mail as defined by the Multipurpose Internet Mail Extensions (MIME) . HTTP is also used as a generic protocol for communication between user agents and proxies/gateways to other Internet systems, including those supported by the SMTP , NNTP , FTP , Gopher , and WAIS protocols.

This specification uses a number of terms to refer to the roles played by participants in, and objects of, the HTTP communication. connection A transport layer virtual circuit established between two programs for the purpose of communication. message The basic unit of HTTP communication, consisting of a structured sequence of octets and transmitted via the connection.

request An HTTP request message.

response An HTTP response message. resource A network data object or service that can be identified by a URI. Resources may be available in multiple representations (e.g. multiple languages, data formats, size, and resolutions) or vary in other ways. entity The information transferred as the payload of a request or response. An entity consists of metainformation in the form of entityheader fields and content in the form of an entity-body. representation An entity included with a response that is subject to content negotiation. content negotiation The mechanism for selecting the appropriate representation when servicing a request. The representation of entities in any response can be negotiated (including error responses). variant A resource may have one, or more than one, representation(s) associated with it at any given instant. Each of these representations is termed a `varriant'. Use of the term `variant' does not necessarily imply that the resource is subject to content negotiation.

client A program that establishes connections for the purpose of sending requests.

user agent The client which initiates a request. These are often browsers, editors, spiders (web-traversing robots), or other end user tools. server An application program that accepts connections in order to service requests by sending back responses. origin server The server on which a given resource resides or is to be created . proxy An intermediary program which acts as both a server and a client for the purpose of making requests on behalf of other clients. Requests are serviced internally or by passing them on, with possible translation, to other servers . gateway A server which acts as an intermediary for some other server. Unlike a proxy, a gateway receives requests as if it were the origin server for the requested resource; the requesting client may not be aware that it is communicating with a gateway. first-hand A response is first-hand if it comes directly and without unnecessary delay from the origin server, perhaps via one or more proxies. A response is also first-hand if its validity has just been checked directly with the origin server.

explicit expiration time

The time at which the origin server intends that an entity should no longer be returned by a cache without further validation. upstream/downstream Upstream and downstream describe the flow of a message: all messages flow from upstream to downstream. Inbound/outbound Inbound and outbound refer to the request and response paths for messages: "inbound" means "traveling toward the origin server", and "outbound" means "traveling toward the user agent"

Overall operation:
The HTTP protocol is a request/response protocol. A client sends request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a connection with a server. The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity metainformation, and possible entity-body content. Most HTTP communication is initiated by a user agent and consists of a request to be applied to a resource on some origin server. In the simplest case, this may be accomplished via a single connection (v) between the user agent (UA) and the origin server (O).

Requet chain



Response chain

A more complicated situation occurs when one or more intermediaries are present in the request/response chain. There are three common forms of intermediary: proxy, gateway, and tunnel. A proxy is a forwarding agent, receiving requests for a URI in its absolute form, rewriting all or part of the message, and forwarding the reformatted request toward the server identified by the URI. A gateway is a receiving agent, acting as a layer above some other server(s) and, if necessary, translating the requests to the underlying server's protocol. A tunnel acts as a relay point between two connections without changing the messages; tunnels are used when the communication needs to pass through an intermediary (such as a firewall) even when the intermediary cannot understand the contents of the messages. Three intermediaries (A, B, and C) between the user agent and origin server. A request or response message that travels the whole chain will pass through four separate connections. This distinction is important because some HTTP communication options may apply only to the connection with the nearest, non-tunnel neighbor, only to the end-points of the chain, or to all connections along the chain. Although the diagram is linear, each participant may be engaged in multiple, simultaneous communications. For example, B may be receiving requests from many clients other than A, and/or forwarding requests to servers other than C, at the same time that it is handling A's request.

Protocol Parameters:
i) Http URL URL is an acronym for Uniform Resource Locator and is a reference (an address) to a resource on the Internet. The following is an example of a URL which addresses the Java Web site hosted by Sun Microsystems:

As in the previous diagram, a URL has two main components:
• •

Protocol identifier Resource name Note that the protocol identifier and the resource name are separated by a colon and two forward slashes. The protocol identifier indicates the name of the protocol to be used to fetch the resource. The example uses the Hypertext Transfer Protocol (HTTP), which is typically used to serve up hypertext documents. HTTP is just one of many different protocols used to access different types of resources on the net. Other protocols include File Transfer Protocol (FTP), Gopher, File, and News. The resource name is the complete address to the resource. The format of the resource name depends entirely on the protocol used, but for many protocols, including HTTP, the resource name contains one or more of the components listed in the following table: Host Name The name of the machine on which the resource lives. Filename The pathname to the file on the machine.

Port Number Reference

The port number to which to connect (typically optional). A reference to a named anchor within a resource that usually identifies a specific location within a file (typically optional).

The "http" scheme is used to locate network resources via the HTTP protocol. This section defines the scheme-specific syntax and semantics for http URLs. http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]] If the port is empty or not given, port 80 is assumed. The semantics are that the identified resource is located at the server listening for TCP connections on that port of that host, and the Request-URI for the resource is abs_path . The use of IP addresses in URLs SHOULD be avoided whenever possible . If the abs_path is not present in the URL, it MUST be given as "/" when used as a Request-URI for a resource . If a proxy receives a host name which is not a fully qualified domain name, it MAY add its domain to the host name it received. If a proxy receives a fully qualified domain name, the proxy MUST NOT change the host name.

Software design is the technical heart of the software engineering process. Here whatever the software requirements specified in the analysis phases are to be translated into a representation of software.

Software design is a process through which requirements are translated into representation of software. Initially the representation depicts a holistic view of software. Subsequent refinement leads to a design representation that is very close to source code. From a project management point of view, software design is conducted in two steps. These two steps are: Preliminary Design Detailed Design The preliminary design is concerned with the transformation of requirements into data and software architecture. Detailed design focuses on architectural representation for software. The Object-Oriented design is applied for the system.


The System is designed with the following properties.

a) Verifiability:
The design is concerned with how easily the correctness of the design can be argued.

b) Tracability:
This property can aid design verification. It requires all design elements to be traceable to the requirements.

c) Completeness:
All the different components of the design i.e. relevant data structures, modules, external interfaces and module interconnections are specified

d) Efficiency:
It is concerned with the proper use of scarce resources by the system.

e) Simplicity and Understand ability:
A simple design is likely to have a high degree of independence between modules. During maintenance, the maintainer has a thorough understanding of the different modules of the system, how the modules are interconnected, how modifying one will affect the other, should the modification be undertaken.

Design is concerned with the mapping of objects in the problem space into objects in the solution space and creating an overall structure and computational models of the system. The object oriented design approach may involve the following steps.

Review of the Objects Created in the Analysis Phase:

The main objective of this review exercise is to refine the objects in terms of the attributes and operations and to identify other objects that are solution specific.

Specification of Class dependencies:
Analysis of the relationships between the classes is central to the structure of a system. The major relationships that are important in the context of design are: Inheritance relationships User relationships The class dependencies in this project have a relationship of multilevel inheritance.

Organization of Class Hierarchies:
Organization of class hierarchies involves identification of common attributes and functions among a group of related classes and then combining them to form new class.

Design of Classes:
This step involves looking at the complete details that each class represents. The important issue is to decide what functions are to be provided.

Design of Member Functions:
The member functions define the operations that are performed on the object’s data.

4.4 Modular Design
The design of a project can be effectively done by using the Modular Design approach. In this approach we follow the method of dividing the project into several modules recursively until each module can be handled individually effectively, after designing such modules they are combined accordingly to get

the final output. This approach makes the designer to have good control over his project and he can easily debug the project to find out the errors during the course of the design of his project. He can modify the project easily so that the project can be updated to any new requirement in the future. This lead us to use this approach to design our project effectively. Our project is basically divided into 3 modules. 1. HTTP Module 2. FTP Module 3. E-cabinet Module

HTTP Module
This module provides the basic navigator function to navigate over the “web pages”. Also it consists of several sub-modules, which provides all the basic functionalities that we normally encountered in “Internet Explorer”. Accordingly this module consists of several sub-modules, which are History Module Favorite Module View Source Module MailHandler Module Print Module

FTP Module
This Module makes it possible to communicate with the FTP server. Once we connect to the FTP server we can perform the basic “Uploading” and “Downloading” operations with FTP server.

E-Cabinet Module
This module provides the facility to store text files in the server address space in the intended user’s login. This module is implemented using JAVA “Socket “ and “Server Socket” classes.

4.5 Data Flow Diagrams

4.5.1DFD’s FOR HTTP Module
HTTP Handle r Requested Page will be displayed

URL Address

Context Level DFD of HTTP Handler

URL Address

Previous Page

Next Page HTTPHandle r History Requested page Will be Displayed HTML Document will be opened

View Source

Favor ites Level- I DFD of HTTP Handler

Add to Favorites

Request for Previous page Retrieve Previous page from History

URL Address HTTP Handle Previous

Previous Page will be displayed Level –ii DFD of HTTP Previous Page Request for next page URL Address HTTP Handle NEXT

Retrieve Next page from History

Next page will be displayed Level –ii DFD of HTTP Next Page

URL Address

HTTP Handler

Favorite s

Add to Favorite s

Best Links

Add to Favorite s Favorite s

The Current Page will be added to Favorites

Best Links

List Of Best Links

Selected Best link Page will be displayed

Level – ii DFD of HTTP Favorites


URL Address

HTTP Handler



List of Pages that U had visited will be displayed



The selected Page will be Displayed


The Page will be Deleted from List Level-ii DFD for History Module

URL Address

HTTP Handler

View Source

Source code of the URL will be displayed Level –ii DFD of HTTP View Source module

URL Address

HTTP Handler

View Source

Open an URL Connection with the Requested URL

Retrieve the HTML file using Input Stream Object

Level –iii DFD of HTTP View Source module

The Source code of the requested page will be displayed

4.5.2 DFD’s for FTP Module

Server Information

Connection Establishment with server

Processing the user request

Context-Level DFD of FTP Handler UP Load

D OWN Load Connection with server FTP Handler MAKE Director y DELET E Director Processing the user request


LEVEL –I DFD of FTP Handler

User Request FTP Handler Upload File Select the File U want to upload Selected File will be uploaded

Level –ii DFD of FTP Upload function

FTP Handler

User Request Download File

Select the file U want to download

Selected File will be downloaded Level – ii DFD of FTP Download Function

Directory will be created

myFtp.mkdi r (dirName) User Request MAKE Director y Client or Local Side

Server Side

FTP Handler

dir.mkdir( ) Directory will be Created

Level –ii DFD For “MAKING Directory” Function

FTP Handle

User Request myFtp.rmdir (dirname)

Server Side

DELETE Directory

Directory will be deleted Client or Local Side


Level - ii DFD for FTP DELETE Directory Function

Directory will be deleted

User Request FTP Handle r Rename

Server Side

OldFileName.ren ameTo (new Filename)

Client Side

Selected directory will be renamed

myFtp.mv(oldname,newN ame)

Selected directory will be renamed Level – ii DFD for FTP RENAME Function

4.6 FLOW Charts 4.6.1 HTTP Module

START Warning Valid message PREVIOUS HTTP ? URL NEXT PAGE will be PAGE Handler ADD to YES NO displayed Favorites

Requested page will VIEW be displayed Source


URL Address

MAIL Handler







HTTP Handler

Retrieve Previous page from History

Previous page exists ?


Display the Page

NO Display the Current Page



NEXT PAGE Next page Retrieve Next Display the exists? USER page from CurrentHandler HTTP Page History request


Display the Page




Current URL address

NO IF it is not already added ?

The URL address will not be added

YES The URL address will be added



URL address

YES If the URL is valid ? NO

HTML document of the URL will be displayed

Warning message will be displayed



Source address, Destination address, Message User input

MAIL Handler

Connection with SMTP mail server

NO Connection Established? YES Message may not be send

4.6.2 FTP Module sent

Message will be START


Information for Connection

Connection with Requested Server


UP LOAD the File

Connection Established? USER DOWN MAKE Load the requestYES Directory

Not valid Information

DELETE Directory

Retur n









MAKE Directory

Select the side where u want to make Directory

YES Client Side? Enter the Directory Name

Enter the Directory Error Name Messg will be displayed YES

If the Error Messg will Directory be displayedbe Directory YES will not




If the Directory
Directory will be created

Directory will be created

Directory will not be created


Sign up to vote on this title
UsefulNot useful