Web Hosting Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting

Alden Hosting provides professional, efficient, and reliable business-class Web hosting services to small- and medium-sized businesses.

WWW.

Call Us Toll-Free
(877) 256-0328

Outside USA
1 - (201) 505-0430

Web Hosting Welcome Web Hosting Web Hosting Plans Overview , Fund Raising, Fundraising, web hosting, website hosting, web site hosting Web Hosting Fund Raising, Fundraising, web hosting Web Hosting Resellers, web Hosting Web Hosting Web Design, web Hosting Web Hosting Extra Services,  web Hosting Web Hosting Traffic Booster, web hosting Web Hosting Traffic Booster, web hosting Web Hosting Technical Support,  web Hosting Web Hosting webmaster tips,  web Hosting Web Hosting 30 Day Money Back, web hosting Web Hosting Legal Notices for Web Hosting Web Hosting Glossary Computer Terms for web Hosting Web Hosting Contact Information - web hosting

Site Map

  Web Hosting Web Hosting Sign-Up   Web Hosting Fund Raising, Fundraising, web hosting, website hosting, web site hosting    Web Hosting Resellers web hosting, website hosting, web site hosting   Web Hosting EZ Site Control Panel for web hosting,website hosting, web site hosting
Catalina Functional Specifications - Default Servlet

      Catalina Functional Specifications

The Apache Tomcat 5.5 Servlet/JSP Container

Apache Logo

Links

Administrative Apps

Internal Servlets

Realm Implementations

Catalina Functional Specifications

Default Servlet

Printer Friendly Version
print-friendly
version
Overview
Introduction

The purpose of the Default Servlet is to serve static resources of a web application in response to client requests. As the name implies, it is generally configured as the "default" servlet for a web application, by being mapped to a URL pattern "/".

External Specifications

The following external specifications have provisions which partially define the correct behavior of the default servlet:

Implementation Requirements

The implementation of this functionality shall conform to the following requirements:

  • Must be implemented as a servlet.
  • Must support configurable parameters for debugging detail level, input buffer size, output buffer size, whether or not to produce directory listings when no welcome file is present, and whether or not modifications are supported via DELETE and PUT.
  • Log debugging and operational messages (suitably internationalized) via the getServletContext().log() method.
Dependencies
Environmental Dependencies

The following environmental dependencies must be met in order for the default servlet to operate correctly:

  • The default servlet must be registered in the application deployment descriptor (or the default deployment descriptor in file $CATALINA_HOME/conf/web.xml) using a "default servlet" servlet mapping, signified by URL pattern "/".
Container Dependencies

Correct operation of the default servlet depends on the following specific features of the surrounding container:

  • The container shall provide a servlet context attribute that lists the welcome file names that have been defined for this web application.
  • The container shall provide a servlet context attribute that contains a javax.naming.directory.DirContext implementation representing the static resources of this web application.
Functionality
Initialization Functionality

The following processing must be performed when the init() method of the invoker servlet is called:

  • Process and sanity check configuration parameters.
Per-Request Functionality

For all HTTP request methods, the resource path is determined from the path information provided to this request, either as request attribute javax.servlet.include.path_info (for a request dispatcher access to a static resource) or by calling request.getPathInfo() directly.

On each HTTP DELETE request processed by this servlet, the following processing shall be performed:

  • If modifications to the static resources are not allowed (set by a configuration parameter), return HTTP status 403 (forbidden).
  • If an attempt is made to delete a resource from /META-INF or /WEB-INF, return HTTP status 403 (forbidden).
  • If the requested resource does not exist, return HTTP status 404 (not found)
  • Unbind the resource from the directory context containing the static resources for this web application. If successful, return HTTP status 204 (no content). Otherwise, return HTTP status 405 (method not allowed).

On each HTTP GET request processed by this servlet, the following processing shall be performed:

  • If the request is for a resource under /META-INF or /WEB-INF, return HTTP status 404 (not found).
  • If the requested resource does not exist, return HTTP status 404 (not found).
  • If the requested resource is not a directory, but the resource path ends in "/" or "\", return HTTP status 404 (not found).
  • If the requested resource is a directory:
    • If the request path does not end with "/", redirect to a corresponding path with "/" appended so that relative references in welcome files are resolved correctly.
    • If one of the specified welcome files exists, redirect to the path for that welcome file so that it will be served explicitly.
  • If the request being processed contains an If-Range header, perform the processing described in the HTTP/1.1 specification to determine whether the client's information is up to date.
  • Determine the content type of the response, by looking up the corresponding MIME type in our servlet context.
  • If the requested resource is a directory:
    • If directory listings are suppressed, return HTTP status 404 (not found).
    • Set the content type to text/html.
  • Determine the range(s) to be returned, based on the existence of any If-Range and Range headers.
  • If the requested resource is a directory, include an ETag header in the response, with the value calculated based on the content of the directory.
  • Include a Last-Modified header in the response documenting the date/time that the resource was last modified.
  • Unless we are processing a HEAD request, include the appropriate content (or content ranges) in the response.

On each HTTP HEAD request processed by this servlet, the following processing shall be performed:

  • Processed identically to an HTTP GET request, except that the data content is not transmitted after the headers.

On each HTTP POST request processed by this servlet, the following processing shall be performed:

  • Processed identically to an HTTP GET request.

On each HTTP PUT request processed by this servlet, the following processing shall be perfomred:

  • If modifications to the static resources are not allowed (set by a configuration parameter), return HTTP status 403 (forbidden).
  • If an attempt is made to delete a resource from /META-INF or /WEB-INF, return HTTP status 403 (forbidden).
  • Create a new resource from the body of this request.
  • Bind or rebind the specified path to the new resource (depending on whether it currently exists or not). Return HTTP status as follows:
    • If binding was unsuccessful, return HTTP status 409 (conflict).
    • If binding was successful and the resource did not previously exist, return HTTP status 201 (created).
    • If binding was successful and the resource previously existed, return HTTP status 204 (no content).
Finalization Functionality

No specific processing is required when the destroy() method is called:

Testable Assertions

In addition the the assertions implied by the functionality requirements listed above, the following additional assertions shall be tested to validate the behavior of the invoker servlet:

  • Requests for resources that do not exist in the web application must return HTTP status 404 (not found).
  • The default servlet must operate identically for web applications that are run out of a WAR file directly, or from an unpacked directory structure.
  • If the web application is running out of an unpacked directory structure, the default servlet must recognize cases where the resource has been updated through external means.

Copyright © 1999-2006, Apache Software Foundation
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Add to My Yahoo!

XML icon

Add to Google

 

 

 

 

 

 

 

 

 

 

 

http://alden-servlet-Hosting.com
JSP at alden-servlet-Hosting.com
Servlets at alden-servlet-Hosting.com
Servlet at alden-servlet-Hosting.com
Tomcat at alden-servlet-Hosting.com
MySQL at alden-servlet-Hosting.com
Java at alden-servlet-Hosting.com
sFTP at alden-servlet-Hosting.com
http://alden-tomcat-Hosting.com
JSP at alden-tomcat-Hosting.com
Servlets at alden-tomcat-Hosting.com
Servlet at alden-tomcat-Hosting.com
Tomcat at alden-tomcat-Hosting.com
MySQL at alden-tomcat-Hosting.com
Java at alden-tomcat-Hosting.com
sFTP at alden-tomcat-Hosting.com
http://alden-sftp-Hosting.com
JSP at alden-sftp-Hosting.com
Servlets at alden-sftp-Hosting.com
Servlet at alden-sftp-Hosting.com
Tomcat at alden-sftp-Hosting.com
MySQL at alden-sftp-Hosting.com
Java at alden-sftp-Hosting.com
sFTP at alden-sftp-Hosting.com
http://alden-jsp-Hosting.com
JSP at alden-jsp-Hosting.com
Servlets at alden-jsp-Hosting.com
Servlet at alden-jsp-Hosting.com
Tomcat at alden-jsp-Hosting.com
MySQL at alden-jsp-Hosting.com
Java at alden-jsp-Hosting.com
sFTP at alden-jsp-Hosting.com
http://alden-java-Hosting.com
JSp at alden-java-Hosting.com
Servlets at alden-java-Hosting.com
Servlet at alden-java-Hosting.com
Tomcat at alden-java-Hosting.com
MySQL at alden-java-Hosting.com
Java at alden-java-Hosting.com
sFTP at alden-java-Hosting.com
JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP at JSP.aldenWEBhosting.com Servlets at servlets.aldenWEBhosting.com Tomcat at Tomcat.aldenWEBhosting.com mysql at mysql.aldenWEBhosting.com Java at Java.aldenWEBhosting.com Web Hosts Portal Web Links Web Links Web Hosting JSP Solutions Web Links JSP Solutions Web Hosting Servlets Solutions Web Links Servlets Solutions Web Hosting Web Links Web Links . .
.
.
. .
. . . . jsp hosting servlets hosting web hosting web sites designed cheap web hosting web site hosting myspace web hosting