2.5.1
Web Applications
A Web Application is a collection of resources that are available through some URLs. The
resources include JSP pages, Java Servlet classes, static pages and other Java technology
based resources and classes to be used at the server side as well as Java resources and classes
(like Applets, JavaBeans components, and others) which are to be downloaded for use by the
client. A Web Application is described in more detail in Chapter 9 of the Servlet 2.2
specification.
A Web Application contains a deployment descriptor
web.xm
l that contains information
about the JSP pages, Servlets, and other resources used in the Web Application. The
Deployment Descriptor is described in detail in Chapter 13 of the Servlet 2.2 specification.
JSP 1.1 requires that all these resources are to be implicitly associated with and accessible
through a unique
ServletContext
instance, which is available as the
application
implicit object (Section 2.8). The JSP specification inherits the notions of a Web Application
from the Servlet 2.2 specification.
The application to which a JSP page belongs is reflected in the
application
object and
has impact on the semantics of the following elements:
The
include
directive (Section 2.7.6)
The
jsp:include
action element (Section 2.13.4).
The
jsp:forward
action (Section 2.13.5).
2.5.2
Relative URL Specifications within an Application
Elements may use
relative URL specifications
, which are called URI paths in the Servlet
2.1 specification. These paths are as in RFC 2396 specification; i.e. only the path part, no
scheme nor authority. Some examples are:
myErrorPage.jsp
/errorPages/SyntacticError.jsp
/templates/CopyrightTemplate.html
When such a path starts with a / , it is to be interpreted by the application to which the JSP
page belongs; i.e. its
ServletContext
object provides the base context URL. We call
these paths context relative paths .
When such a path does not start with a / , it is to be interpreted relative to the current JSP
page: the current page is denoted by some path starting with / which is then modified by
the new specification to produce a new path that starts with / ; this final path is the one
interpreted through the
ServletContext
object. We call these paths page relative
paths .
Chapter 2
Standard Syntax and Semantics
40
JSP Web Hosting JavaServer Pages Specifications JSP Hosting
|
|
|
|
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved. |