Sid,
I think you will have to create a new binding prefix like "myAsset:", and hook it in to a dispatcher that returns a StreamResponse. That way you can decide how to read the images, e.g. from DB, or from directory on your server. Your myAsset binding prefix will probably convert the value into a url like: /mySpecialAssets/someAsset

Do a search for adding a new binding prefix. And then look at the Dispatcher class. You will need to subclass it, and specify your own dispatch function. Something like this should be right (not tried at all in code)

public boolean dispatch(Request request, Response response) {
    if (!request.getPath().startsWith("/mySpecialAssets/") {
        return false;
    }
    OutputStream os = response.getOutputStream("image/png");
    os.write(loadMySpecialAsset(request.getPath()));
    os.flush();
    return true;
}

Sorry for the very rough ideas, I'm only getting started with T5 too.

Good luck,
Jonathan

On 04/02/2009 13:18, Sid Ferreira wrote:
example in a _dynamic_ folder shared between some projects.

On Wed, Feb 4, 2009 at 11:17, Sid Ferreira<sid....@gmail.com>  wrote:

No they are outside the webapp, I mean a custom asset wich is anywhere in
my server. For example in a folder shared between some projects.


On Wed, Feb 4, 2009 at 11:15, Thiago H. de Paula Figueiredo<
thiag...@gmail.com>  wrote:

On Wed, Feb 4, 2009 at 10:58 AM, Sid Ferreira<sid....@gmail.com>  wrote:
This part of prefix and symbols I know, I wanted to mean about custom
assets,
Where are the assests? Are they inside the webapp context? If yes,
then Tapestry already does what you need.
What do you mean about custom assets?

--
Thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


--
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to