Hi Angelo

On Tue, Sep 20, 2011 at 4:49 PM, Angelo van der Sijpt
<[email protected]> wrote:
> Hi List,
>
> On http://www.amdatu.org/confluence/display/Amdatu/Web+Framework I found the 
> description of the new (as in, 0.2.0) web mechanism, including the new 
> ResourceProvider with its own support. However, I'm a little mystified on the 
> exact usage of this.
>
> When registering a ResourceProvider with a resourceAlias, I can see that the 
> ResourceSupport bundle picks it up and makes it into a Servlet (though, only 
> when I provide a contextId property), but do I have to inspect my own bundle 
> to find the resources, or is that what Resource Support is for?
>

Resource support only supports the registration of a default resource
serving servlet implementation (ResourceServlet) that is initialized
with a ServletContext backed by the HttpContext identified by the
contextid you specify. You still need to implement your own
getResource(). I realize this is less support then in 0.1 but we chose
to remove the hardcoded mapping between request path and path in
bundle. A simple baseclass could obviously return the convenience.

ResourceProvider, Securityhandler and MimeTypeResolver are just
convienience service interfaces that either trigger the instantiation
of a named DelegatingHttpContext or join it if it already exists.
Therefore you are required to specify the contextId. This is different
from Servlets and Filters that are allowed to not specify an Id in
which case they will recieve a private NOP context.

Hope your are now demystified ;)

grz
Bram

> Thanks,
>
> Angelo
> _______________________________________________
> Amdatu-users mailing list
> [email protected]
> http://lists.amdatu.org/mailman/listinfo/amdatu-users
>

_______________________________________________
Amdatu-users mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-users

Reply via email to