Author: dklco
Date: Fri Jun  6 14:49:42 2014
New Revision: 1600902

URL: http://svn.apache.org/r1600902
Log:
Updating the mime type support page

Added:
    sling/site/trunk/content/documentation/bundles/mimetypes.png   (with props)
Modified:
    
sling/site/trunk/content/documentation/bundles/mime-type-support-commons-mime.mdtext

Modified: 
sling/site/trunk/content/documentation/bundles/mime-type-support-commons-mime.mdtext
URL: 
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/mime-type-support-commons-mime.mdtext?rev=1600902&r1=1600901&r2=1600902&view=diff
==============================================================================
--- 
sling/site/trunk/content/documentation/bundles/mime-type-support-commons-mime.mdtext
 (original)
+++ 
sling/site/trunk/content/documentation/bundles/mime-type-support-commons-mime.mdtext
 Fri Jun  6 14:49:42 2014
@@ -16,7 +16,7 @@ The Servlet API specification provides a
 
 ## Enter Sling: The MimeTypeService
 
-Already at the start of the Sling project we realized, that just basing the 
MIME type mapping decisions on the servlet container will not yield acceptable 
results. For this reason the Apache Sling projects provides a spezialized and 
configurable service supporting such mappings: The [`MimeTypeService`]({{ 
refs.http://incubator.apache.org/sling/apidocs/sling5/org/apache/sling/commons/mime/MimeTypeService.html.path
 }}).
+Already at the start of the Sling project we realized, that just basing the 
MIME type mapping decisions on the servlet container will not yield acceptable 
results. For this reason the Apache Sling projects provides a spezialized and 
configurable service supporting such mappings: The 
[`MimeTypeService`](/apidocs/sling6/org/apache/sling/commons/mime/MimeTypeService.html).
 
 This service provides access to registered MIME types and their mappings with 
two methods:
 
@@ -35,7 +35,7 @@ Two more method allow to programmaticall
 
 Besides the `MimeTypeService` provided by Apache Sling, there is actually more:
 
-* The 
[`SlingHttpServletRequest`](http://incubator.apache.org/sling/apidocs/sling5/org/apache/sling/api/SlingHttpServletRequest.html)
 provides the `getResponseContentType()` method, which returns the preferred 
*Content-Type* for the response based on the requests extension. This method is 
implemented by Apache Sling using the `MimeTypeService`. So servlets and 
scripts may just call this method to set the content type of the response to 
the desired value.
+* The 
[`SlingHttpServletRequest`](/apidocs/sling6/org/apache/sling/api/SlingHttpServletRequest.html)
 provides the `getResponseContentType()` method, which returns the preferred 
*Content-Type* for the response based on the requests extension. This method is 
implemented by Apache Sling using the `MimeTypeService`. So servlets and 
scripts may just call this method to set the content type of the response to 
the desired value.
 * Each Servlet (and JSP scripts) is initialized by Apache Sling with a 
`ServletContext` instance whose implementation of the `getMimeType(String)` 
effectively calls the `MimeTypeService.getMimeType(String)` method.
 * The Scripting support infrastructure of Sling sets the response content type 
on behalf of the script to the default value as returned by the 
`SlingHttpServletRequest.getResponseContentType()` method. At the same time the 
response character set is also set to `UTF-8` for *text* content types.
 
@@ -50,7 +50,7 @@ The implementation of the `MimeTypeServi
 * Bundle provided mappings. Bundles registered in the OSGi framework may 
contain MIME type mappings files `META-INF/mime.types` which are loaded 
automatically by the Apache Sling MIME type mapping support bundle.
 * Configuration. Mappings may be supplied by configuration of the 
`MimeTypeService` implementation as the multi-value string property 
`mime.types`. Each value of the property corresponds to a line in a MIME type 
configuration file (see below for the format).
 * Registered Mappings. Mappings may be registered with the 
`MimeTypeService.registerMapping` methods.
-* 
[`MimeTypeProvider`](http://incubator.apache.org/sling/apidocs/sling5/org/apache/sling/commons/mime/MimeTypeProvider.html).
 Additional mappings may be provided by service implementing the 
`MimeTypeProvider` interface. The `MimeTypeService` implementation will call 
these services in turn until a service returns a mapping provided there is no 
static configuration to responde to the mapping request.
+* 
[`MimeTypeProvider`](/apidocs/sling6/org/apache/sling/commons/mime/MimeTypeProvider.html).
 Additional mappings may be provided by service implementing the 
`MimeTypeProvider` interface. The `MimeTypeService` implementation will call 
these services in turn until a service returns a mapping provided there is no 
static configuration to responde to the mapping request.
 
 Please note, that existing mappings cannot be overwritten later. Thus mappings 
have an inherent priority:
 
@@ -62,7 +62,6 @@ Please note, that existing mappings cann
 1. Mappings provided by `MimeTypeProvider` services
 
 
-
 ## MIME Type Mapping File Format
 
 The file format for MIME type mapping files is rather simple:
@@ -75,9 +74,8 @@ The file format for MIME type mapping fi
 THe data line format described here also applies to configuration provided by 
the values of the `mime.types` property of the MIME type service configuration. 
The file format description applies to all `META-INF/mime.types` files provided 
by the bundles as well as input streams supplied to the 
`MimeTypeService.registerMimeType(InputStream)` method.
 
 
-
 ## Web Console Plugin
 
 The Apache Sling MIME type mapping support bundle implements a plugin for the 
Apache Felix Web Console which may be consulted to investigate the current 
contents of the MIME type mapping tables.
 
-!mimetypes.png|thumbnail!
\ No newline at end of file
+![Mime Types Web Console Plugin](/documentation/bundles/mimetypes.png)
\ No newline at end of file

Added: sling/site/trunk/content/documentation/bundles/mimetypes.png
URL: 
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/mimetypes.png?rev=1600902&view=auto
==============================================================================
Binary file - no diff available.

Propchange: sling/site/trunk/content/documentation/bundles/mimetypes.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream


Reply via email to