...
As a result of the service.registerResources("/static", "/etc/www", null)
code, all the files available under /etc/www
will be exposed under /static
(f.i. http://localhost:8080/static/001.jpg will render the /etc/www/001.jpg). However, the example above can be simplistic in practice; the HttpContext object is the solution to customize the resource handling.
...
The Jetty based implementation supports the following Jetty specific configuration as of Http Service Jetty Bundle 2.4:
org.apache.felix.http.host
- Host name or IP Address of the interface to listen on. The default isnull
causing Jetty to listen on all interfaces.org.apache.felix.http.context_path
- The Servlet Context Path to use for the Http Service. If this property is not configured it defaults to "/". This must be a valid path starting with a slash and not ending with a slash (unless it is the root context).org.apache.felix.http.timeout
- Connection timeout in milliseconds. The default is 60000 (60 seconds).org.apache.felix.http.session.timeout
- Allows for the specification of the Session life time as a number of minutes. This property serves the same purpose as thesession-timeout
element in a Web Application descriptor. The default is zero for no timeout at all.org.mortbay.jetty.servlet.SessionCookie
- Name of the cookie used to transport the Session ID. The default isJSESSIONID
.org.mortbay.jetty.servlet.SessionURL
- Name of the request parameter to transport the Session ID. The default isjsessionid
.org.mortbay.jetty.servlet.SessionDomain
- Domain to set on the session cookie. The default isnull
.org.mortbay.jetty.servlet.SessionPath
- The path to set on the session cookie. The default is the configured session context path (/
).org.mortbay.jetty.servlet.MaxAge
- The maximum age value to set on the cookie. The default is-1
.org.apache.felix.http.jetty.headerBufferSize
- Size of the buffer for request and response headers. Default is 16KB.org.apache.felix.http.jetty.requestBufferSize
- Size of the buffer for requests not fitting the header buffer. Default is 8KB.org.apache.felix.http.jetty.responseBufferSize
- Size of the buffer for responses. Default is 24KB.
...
- Filter registration sample: http://svn.apache.org/repos/asf/felix/trunk/http/samples/filter/
- Servlet bridge sample: http://svn.apache.org/repos/asf/felix/trunk/http/samples/bridge/
- Whiteboard sample: http://svn.apache.org/repos/asf/felix/trunk/http/samples/whiteboard/
Maven Artifacts
...