SRV.2.1 Basic Terms


SRV.2.1.1 Uniform Resource Locators

A uniform resource locator (URL) is a compact string representation of resources available via the network. Once the resource represented by a URL has been accessed, various operations may be performed on that resource. [1] URLs are a form of a uniform resource identifier (URI). URLs are typically of the form:

[1] See RFC 1738.

 <protocol>//<servername>/<resource> 

For the purposes of this specification, we are primarily interested in HTTP based URLs which are of the form:

 http[s]://<servername>[:port]/<url-path>[?<query-string>] 

For example:

http://java.sun.com/products/servlet/index.html

https ://javashop.sun.com/purchase

In HTTP based URLs, the '/' character is reserved for use to separate a hierarchical path structure in the URL-path portion of the URL. The server is responsible for determining the meaning of the hierarchical structure. There is no correspondence between a URL-path and a given file system path.

SRV.2.1.2 Servlet Definition

A servlet definition is a unique name associated with a fully qualified class name of a class implementing the Servlet interface. A set of initialization parameters can be associated with a servlet definition.

SRV.2.1.3 Servlet Mapping

A servlet mapping is a servlet definition that is associated by a servlet container with a URL path pattern. All requests to that path pattern are handled by the servlet associated with the servlet definition.

SRV.2.1.4 Web Application

A web application is a collection of servlets, JavaServer Pages, [2] HTML documents, and other web resources which might include image files, compressed archives, and other data. A web application may be packaged into an archive or exist in an open directory structure.

[2] See the JavaServer Pages specification, Section JSP, in this volume.

All compatible servlet containers must accept a web application and perform a deployment of its contents into their runtime. This may mean that a container can run the application directly from a web application archive file or it may mean that it will move the contents of a web application into the appropriate locations for that particular container.

SRV.2.1.5 Web Application Archive

A web application archive is a single file which contains all of the components of a web application. This archive file is created by using standard JAR tools which allow any or all of the web components to be signed.

Web application archive files are identified by the .war extension. A new extension is used instead of .jar because that extension is reserved for files which contain a set of class files and that can be placed in the classpath or double clicked using a GUI to launch an application. As the contents of a web application archive are not suitable for such use, a new extension was in order.



Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net