tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas LE BAS <m...@nlebas.net>
Subject Re: Running tiles 3.0 outside of a servlet environment
Date Mon, 17 Oct 2011 00:36:14 GMT
Thanks Antonio for your advice.

I can see the references to servlets in [5] et [6]; I'm not sure if they 
serve any practical purpose any more in tiles 3.0 and I believe I can 
remove them easily enough.

However javax.servlet.* is referered to in the renderers themselves: 
tiles-request-freemarker [7] and tiles-request-velocity [8]. That's why 
I'm using custom renderers. And the autotags depend on [7] and [8], too.

Now I'm not quite sure what your advice is. You seem to suggest that I 
just drop the current implementation and bind the autotags directly to 
custom renderers, but at the same time you say I don't need custom 
renderers... What did I miss?



On 11-10-16 08:53 AM, Antonio Petrelli wrote:
> 2011/10/16 Nicolas LE BAS<mail@nlebas.net>
>> After playing around a bit with Tiles 3.0 (from trunk), I think it comes
>> pretty close to the mark. By using custom renderers and a custom Request
>> class, I can include my foreign content into my webapp and run the container
>> outside of a servlet environment...
> I think that you don't even need custom renderers at all.
> JSP will never run outside of a servlet container of course, but freemarker
>> and velocity should. Except I believe the way they are implemented in tiles
>> forces the use of servlets. Am I wrong (that would be wonderful)?
> Current implementation of Freemarker[1] and Velocity[2] support are tightly
> bound to the servlet environment, but it's not a Tiles fault.
> However you are pretty lucky, since Tiles 3 generates code automatically
> from the "tiles-template" project [3] through the Autotag subproject [4].
>> Would it take a lot to refactor the servlet api out of tiles-freemarker and
>> tiles-velocity ? It seems to me that very few classes would be impacted. Of
>> course, the configuration would be entirely different.
> I think you need only to create your version of
> "tiles-autotag-freemarker-runtime" [5]  or "tiles-autotag-velocity-runtime"
> [6] to remove dependencies to servlets.
> Antonio
> [1]
> http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-parent/tiles-freemarker/
> [2]
> http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-parent/tiles-velocity/
> [3]
> http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-parent/tiles-template/
> [4] http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-autotag/
> [5]
> http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-autotag/tiles-autotag-freemarker-runtime/
> [6]
> http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-autotag/tiles-autotag-velocity-runtime/

View raw message