You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Reto Bachmann-Gmuer <re...@trialox.org> on 2010/05/03 19:30:19 UTC
CLEREZZA-200: make it easier to server static files
I've been looking at the patch for CLEREZZA-200 and saw that there's quite a
similarity between StaticWebResource and FileServer. I would suggest the
following instead of the current approach:
- FileServer inherits from AbstractFileServer
- AbstractFileServer has an abstract protected method getPathNode,
subclasses implement this method to return the root PathNode
I think already this change would be an improvement, as it would allow
jax-rs resources that serve static file to simply inherit from
AbstractFileServer and override the method.
To provide however functionality more similar to the current patch I would
suggest to additionally:
- add a default constructor to file-server
- add methods configure(PathNode), configure(File),
configure(ComponentContext) and configure(ComponentContext context, String
path) to FileServer
Cheers,
reto
Re: CLEREZZA-200: make it easier to server static files
Posted by Manuel Innerhofer <ma...@trialox.org>.
Im okay with that.
Cheers,
Manuel
On Mon, 2010-05-03 at 19:30 +0200, Reto Bachmann-Gmuer wrote:
> I've been looking at the patch for CLEREZZA-200 and saw that there's quite a
> similarity between StaticWebResource and FileServer. I would suggest the
> following instead of the current approach:
>
> - FileServer inherits from AbstractFileServer
> - AbstractFileServer has an abstract protected method getPathNode,
> subclasses implement this method to return the root PathNode
>
> I think already this change would be an improvement, as it would allow
> jax-rs resources that serve static file to simply inherit from
> AbstractFileServer and override the method.
>
> To provide however functionality more similar to the current patch I would
> suggest to additionally:
> - add a default constructor to file-server
> - add methods configure(PathNode), configure(File),
> configure(ComponentContext) and configure(ComponentContext context, String
> path) to FileServer
>
>
> Cheers,
> reto