2011/10/16 Nicolas LE BAS <[email protected]>

> 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.

HTH
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/

Reply via email to