Programming instructions

The Internet and related technologies 7
URLs
Every piece of information on the World Wide Web has a unique address. This address is
called a Uniform Resource Locator, or URL. A URL is a pointer to some bit of data on
the web. This information might include a web document, a file on a FTP site, a posting
on Usenet, or even an e-mail address. URLs contain information about the following:
How to get the information (what protocol to use: FTP, HTTP, and so on)
The Internet host name to contact (for example, www.macromedia.com; http://
localhost/mysite; or ftp.mysite.com)
The directory or other location to locate the requested information
In addition, you use special URLs to send e-mail and for using the Telnet program.
Understanding web application servers
As explained previously, web browsers make requests, and web servers fulfill those
requests by returning the requested information to the browser. This information is
usually HTML files, as well as other types.
When you think about it, web servers capabilities are limited because all they do is wait
for requests to arrive and attempt to fulfill those requests as soon as possible. Web servers
do not let you do the following tasks:
Interact with a database.
Serve up customized information based on user preferences or requests.
Validate user actions.
Web servers, basically, locate information and return that information to a web browser.
To extend the capabilities of a web server, you need a web application server. A web
application server is a software program that lets the web server do more tasks, like those
listed in the previous paragraph.
How a web server and web application server work together
The following steps explain how a web server processes a page that also needs processing
by a web application server:
1 The user requests a page by typing a URL in a browser, and the web server receives
the request.
2 The web server looks at the MIME type (or file extension) to determine whether a
web application server must process the page. Then one of the following actions
occur:
If the MIME type indicates that the file is a simple web page (typically an HTM
extension), then the web server fulfills the request and sends the file to the
browser.
If the MIME type indicates that the requested file is a page that a web application
server must process (CFM or CFC extension for ColdFusion requests), then the
web server passes it to the web application server. The web application server
processes the page and sends the results to the web server, which returns those
results to the browser. The following figure shows this process: