Home > Articles > Data > Oracle

Introduction to Oracle Web Applications

Before baking a cake, you need to know the ingredients; the same is true for Web apps. First take a look at the basics of the Internet, the Web, and browsers and then see how PL/SQL can be a powerful component for Web applications.
This chapter is from the book


After this chapter, you will be able to define:

  • Internet and Web Basics
  • What are Web Applications?

The Web is a powerful front-end for an application, particularly an application built with Oracle PL/SQL.

To build applications on the Web, it is vital to understand what makes the Web work. This chapter reviews the basics of the Internet, the Web, and how a browser works to retrieve a page that you request. The concept of a Web application is explained, both for intranets and for the Internet. Finally, the advantages of using PL/SQL for Web applications are discussed.

The Internet

Ask the next person who says Internet what they mean by the term, and you may get a surprisingly vague reply. Simply put, the Internet is a decentralized, worldwide network of interconnected computers that communicate with each other in a standardized way. The computers are connected using modems and phone lines, cable lines, ISDN lines, Ethernet cards, and fiber-optic cables. To provide convenient wireless communication, infrared and radio waves are being used increasingly as well.

Physical connectivity is not enough to define the Internet. Communication would not be possible if these interconnected computers did not use a shared protocol for transmitting information. A protocol is a set of common standards and software for communication. You can think of it as a common language utilized for communication between all of the different types of computers and operating systems across the Internet. If an English-speaking person in London calls a French-speaking person in Paris, the telephone network connects the two parties, but that does not guarantee that they understand each other. To send information such as an email from one computer to another, both computers, as well as any intermediate computers the message must travel through, must be able to read instructions about the type of message, its source and destination, and how it should be handled, so that it can be successfully transmitted to and read by the intended recipient.

The protocol of the Internet is TCP/IP, which stands for Transmission Control Protocol/Internet Protocol. TCP/IP actually consists of two protocols working together, TCP and IP, though they are commonly referred to as a single protocol, TCP/IP. Messages sent according to this protocol contain a header—beginning lines of text that are separate from the information being sent. This header provides instructions for transmitting the data. In ground mail, letters are enclosed in envelopes that contain addresses in a standard format, as well as conventional phrases for special handling such as "Air Mail," "Poste Restante," or in less fortunate cases, "Return to Sender." Similarly, when information is sent across the Internet, it is sent with a TCP/IP "envelope" that indicates who originated the transmission, who should receive it, and other instructions to ensure the information is sent and received correctly.

To make it possible to find a machine on the Internet, each Internet location has been assigned its own address, called an IP address, or Internet Protocol address. The IP address is used in TCP/IP when specifying the source and destination for the transmission. An IP address is a 32-bit number. Rather than using a cumbersome 32-digit procession of ones and zeros, an IP address is expressed as four numbers separated by decimal points. An example of an IP is Each number can range from 0 to 255, resulting in 256 possibilities, or 8 bits (2 to the power of 8), so each number can be referred to as an "octet."

Sometimes information being transmitted via TCP/IP has its own internal protocol as well. For example, Web pages are transmitted via TCP/IP, but because they are Web pages, they are also sent with an additional header that is compliant with the protocol HTTP, or Hypertext Transfer Protocol. This protocol, HTTP, is a familiar beginning, or prefix, for Web page addresses.

What is the Web?

The World Wide Web, the Web, or the W3, was started by scientists working at CERN, the European Organization for Nuclear Research, in Bern, Switzerland. They needed a convenient way to collaborate and share technical information with their colleagues. By publishing documents on the Internet, they could access colleagues' technical papers and related information easily. Tim Berners-Lee is credited with being the "Father of the Web" for his vision on how to accomplish this. Standards for the Web are maintained currently by the W3C, or World Wide Web Consortium, an international organization. Its Web site is http://www.w3.org.

As explained earlier in this chapter, there is a separate protocol, HTTP, designed specifically for handling Web pages. Web pages themselves are constructed primarily in HTML. HTML, or Hypertext Markup Language, started as a way to add formatting commands, or "markup" in publishing terms, to a technical paper. The "hypertext" part of the name refers to text that can be selected to provide a link to another document. This makes information retrieval easy, and it is one of the hallmarks of the Web; for example, a technical paper that refers to previously published results can include a link to that previous paper, and the user can click back and forth between documents. HTML is covered in further detail in Chapter 5, "Introduction to HTML: Basic Tags, Tables, and Frames," and Chapter 6, "Advanced HTML: Forms, Nested Tables, and Nested Frames."


For a preview of what HTML looks like, go to a Web page, right-click in the browser window, and choose "View Source." This text is what your browser is reading and displaying in the browser window.

Usage of the Web quickly spread beyond the scientific community. With the advent of browsers such as Netscape and Internet Explorer, many users could easily enjoy the ease of publishing and accessing material on the Internet. The Web was born from a need to exchange ideas freely, and that spirit is a large part of the success of the Web.

How Do Web Browsers Work?

The Web browser's basic role is to take a request for a Web page from a user, and then display that page to the user. This is referred to as "rendering" a Web page.

Typing the address of a Web page into a browser to retrieve a Web page is an increasingly familiar activity. What happens behind the scenes?

When a user requests a Web page, the browser locates the Web page on the Internet, retrieves it, and displays it in the browser's window.

Someone who is enthused about U.S. tax returns might enter the following address:


This address is also known as a URL. A URL, or Uniform Resource Locator, is the complete address for locating a specific page, or "resource," on the Internet. Each Web page has a unique URL, and to view a Web page, you must know its URL. You can also use the term URI, Uniform Resource Identifier, though this is really synonymous with URL.

The first step for the browser is to identify who has the file being requested by the user, using the URL. The browser divides a URL such as the one displayed above into three parts. The first part of the URL is the protocol. In this case, the protocol is "http://", which indicates that the file should be retrieved using HTTP, or Hypertext Transfer Protocol. Another protocol you may see often, particularly if you conduct any business on the Web, is HTTPS. This indicates that a Secure Socket Layer, or SSL, is layered on top of the HTTP protocol for additional security. Despite the HTTP or HTTPS, realize that communication also still takes place using the protocol TCP/IP. TCP/IP governs the connection and transmission of the information, whereas HTTP is concerned with the Web page itself. Because the protocol is identified as HTTP in the URL, the browser knows how to structure its request for the Web page.

The second part of the URL is the domain. In this example, it is "www.irs.gov". The domain identifies a specific server machine on the Internet. A domain ends with characters that give a general indication of the site's purpose, such as .com, .org, .net, .gov, .mil, and .edu, as well as many country suffixes such as .uk for United Kingdom, .de for Germany (Deutschland), and .fi for Finland. The middle portion of the domain provides specific information on the site being accessed. In "www.irs.gov", it is "irs", which happens to be the United States Internal Revenue Service, or IRS. For name recognition, most organizations use their own name, or a familiar abbreviation of it, for this part of a URL, unless the preferred URL is already claimed by another organization.

The leftmost part of the domain is the actual machine name, or hostname. Many organizations use "www" as a convention, instead of a specific machine on their network. When a request arrives for a page on the "www" machine, the company's network has configuration files that redirect such requests to an appropriate machine. Using "www" instead of a specific machine name makes it easier for a company to move pages from one machine to another, or to use multiple machines to handle requests, because the user is not specifying a machine name.

As discussed earlier in this chapter, machines on the Internet are identified by an IP address—four numbers divided by decimal points, such as Yet the domain listed above, "www.irs.gov", is alphanumeric. Which is the correct syntax to identify a machine on the Internet? In fact, both methods of identifying a machine on the Internet are correct. One advantage of using a name like "www.irs.gov" is that it is easier to remember than a numeric IP address, to the relief of U.S. taxpayers on April 14. Another advantage is that the systems administrator can associate an alphanumeric domain with another IP address if need be. If you use the IP address for a site that has been moved to a new location on the Internet, you may have problems getting to the site.

If you know the IP address of the site you wish to visit, then you can use that IP address in place of the domain name, and a browser can understand the request. In fact, you eliminate an extra step for the browser. When an alphanumeric domain is used, the browser has to translate that domain name into a numeric IP address before it can request the Web page. To resolve domains, the browser contacts a specific type of server known as a Domain Name System server, or DNS server. The browser may need to contact several DNS servers to translate the domain into an IP address. Companies may also have an internal DNS server, which must be contacted to provide further translation of domains within a company. Eventually, the browser resolves the domain name into a valid IP address, or returns an error.

The third part of the URL, to the right of the domain, is optional. It may be a file name, perhaps with a path. This part refers to the specific resource being requested. In this example, it is "/search/srchelp.html". The user is requesting the resource called "srchelp.html", which is located in a directory called "search." If the URL does not contain this third part, then a default page is displayed. Most Web sites have an initial page with an address that contains only the domain name, for ease in remembering the URL.

Once the browser reads the URL and knows the protocol to use, the IP address of the machine to contact, and the specific path and file being requested, if any, it initiates a request. It connects to the IP address using a specific point of connection on the target server called a port. Ports are numbered, and by convention, the overwhelming majority of systems administrators configure their machines to use port 80 as the default for HTTP Web documents. For this reason, the port number is not usually included in a URL, but the port can be included after the domain if needed. The syntax is a colon followed by the port number. The IRS example could also have been written:


to retrieve the same Web page as:


Through the connection it has established, the browser sends a request, called a GET request, for the Web page. The server processes the request by looking for the directory and file requested. Sometimes the request is for a page that exists on the server already; this type of page is a static page, and the server can transmit the page to the browser that requested it. In other cases, the page has to be generated. The URL invokes scripts that produce the page dynamically, and then transmit the page. This is how you create the application in this book—using PL/SQL to dynamically generate Web pages that contain database content.

If the request is successful, the server returns the requested page to the browser. If it cannot find the resource being requested, it returns an error message to the browser.

Although a user apparently requests a single file to view a Web page, that page may in turn spark additional requests for files to complete the Web page. When rendering a Web page, the browser may find that the page contains several images, which need to be retrieved in turn. Images on a Web page are themselves separate files, as are audio and video files. If you request a Web page with six separate images, the browser will need to retrieve seven documents to display the full page. Thankfully, the browser figures out which additional files are needed, requests them one by one, and assembles them for you, which would be a tedious task otherwise.

This transparent operation allows users to think of visiting a single Web page, even though that one page may be a combination of several files, or the result of a script that created the page upon request.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020