NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide
Migrating to NSJSP 5.0
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-002
7-9
Changes from Servlet 2.3 to Servlet 2.4
•
Provision for shared library files and Classloader extension mechanisms.
For web applications that use shared library files, the Container now provides a
directory for all shared libraries. The files placed in the directory are available to all
web applications. Additionally, deployment support for extensions is recommended
but not required. (Support for extensions is specified using META-
INF/MANIFEST/MF entry in the web application.)
For more details about the MANIFEST.MF entries, see The Java Extension
Mechanism at: http://java.sun.com/j2se/1.4/docs/guide/extensions/
•
Longest path-prefix matching for URL paths.
The Web Container is now required to return the longest path-prefix matching for
URL paths. The order for this matching is:
•
Look for an exact match of the request path to the path of a servlet.
•
Recursively try to match the longest path-prefix by going up the URL path
(from the end) using the forward-slash character (/) as a path separator.
•
If the last piece of the URL path contains an extension (for example, .jsp), the
Container matches a resource which handles request for that particular
extension.
•
If the above rules do not produce a match, the Container tries to serve the
appropriate content for the requested resource. If a default servlet is defined
for the particular web application, the default is used.
•
The HttpServletRequest.getRequestedSessionID() returns the client-
specified session ID. Note that session ID may not be the session ID currently
being used (in case of loads from a persistent store).
•
The RequestDispatcher.forward() includes new attributes for original
request information.
For servlets and JSPs that have been invoked using RequestDispatcher
forward(), and were not obtained using the getNamedDispatcher() method,
the following request attributes, which refer to the original request, are now set:
•
javax.servlet.forward.request_uri
•
javax.servlet.forward.context_path
•
javax.servlet.forward.servlet_path
•
javax.servlet.forward.path_info
•
javax.servlet.forward.query_string
This arrangement is similar to the include request attributes set for all included
requests except that the included request attributes refer to the included request
whereas the forward request attributes refer to the original request. And similar to
the include request attributes, these forward request attributes can be accessed
using the request's getAttribute() method.