World Wide Web is an open-ended information retrieval system designed to be used in the Internet’s distributed environment. This system contains what are known as Web Pages that provides both information and controls. Unlike a menu – driven system where we are guided through a particular direction using a decision tree structure, the Web system is open-ended and we can navigate to a new document in any direction. This is made possible with the help of a language called Hypertext Markup Language (HTML). Web pages contain HTML tags that enable us to find, retrieve, manipulate, and display documents worldwide.
Java was meant to be used in distributed environments such as Internet. Since, both the Web and Java share the same philosophy, Java could be easily incorporated into the Web system. Before Java, the World Wide Web was limited to the display of still images and texts. However, the incorporation of Java into the Web page has made it capable of supporting animation, graphics, games, and a wide range of special effects. With the support of Web, we can run Java program on someone else’s computer access from the Internet.
Java communicates with a Web page through a special tag called <APPLET>.the Figure illustrates the process. It shows the following communication steps:
- The user sends a request for an HTML document to the remote computer’s Web server. The Web server is a program that accepts a request, processes the request, and sends the request document.
- The HTML document is returned to the user’s browser. The document contains the APPLET tag, which identifies the applet.
- The corresponding applet byte code is transferred to the user’s computer. This bytecode had been previously created by the Java compiler using Java source code file for that applet.
- The Java enabled browser on the user’s computer interprets the byte codes and provides output.
- The user may have further interaction with the applet but with no further downloading from the provider’s Web server. This is because the bytecode contains all the information necessary to interpret the applet.