velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <>
Subject Re: [tools-2.0] How to create HTTP-request-based application-wide tool
Date Wed, 25 Feb 2009 12:59:04 GMT
2009/2/25 Antonio Petrelli <>:
> I need to create a tool that is based on HTTP requests for Tiles 2. I
> succesfully did it through extending "ImportSupport" class, so I can
> access the request protected field.
> However, I don't feel comfortable with this solution, because this
> tool needs to be request-scoped and I need to create, at every
> request, a lot of objects that are potentially reusable.
> Is there a way to make this tool application-wide? Or is there a way
> (a repository?) to access a registered application-wide object,
> instead of creating it over and over?

I answer to myself, there is a really simple solution: using
ThreadLocal to store request, response and the Velocity context.
I hope I am doing the right thing :-D


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message