2015-11-27 1:14 GMT+01:00 Nicolas Le Bas <m...@nlebas.net>:
> Hi Łukasz,
>
> I didn't even know struts supported freemarker. Well, I'll admit I've not
> used struts in the past 10 years...

Struts 2 to be correct ;-) And yes, it supports Freemarker directly
from the very beginning, also Struts tags are written in Freemarker

> So... how do you register the struts tags with freemarker without tiles? I
> think it should work more or less the same.

Struts builds a dedicated Model to be used by FM but Tiles does the
same - each of them register tags within the Model (as far I
understand Tiles codebase)
https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java#L504-L517

> Concerning how we do it for tiles: I don't remember how we did back in in
> tiles 2.2, it's probably similar to 3.0, which is awkwards. For 3.1 I'm
> reworking it into just  registering a variable in freemarker's configuration
> object:
>
> https://github.com/nlebas/tiles/blob/master/tiles-freemarker/src/main/java/org/apache/tiles/freemarker/TilesFreemarkerServlet.java

That should help, thanks a lot!


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

Reply via email to