tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Upgrading Struts-Tiles
Date Fri, 27 Nov 2015 08:32:52 GMT
2015-11-27 7:42 GMT+01:00 Lukasz Lenart <lukaszlenart@apache.org>:
> 2015-11-27 7:08 GMT+01:00 Lukasz Lenart <lukaszlenart@apache.org>:
>>> 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!
>
> This won't work :( Did the same but then I get exception:
>
> java.lang.NullPointerException
>     org.apache.tiles.freemarker.context.FreeMarkerUtil.getCurrentContainer(FreeMarkerUtil.java:148)
>     org.apache.tiles.freemarker.template.InsertAttributeFMModel.execute(InsertAttributeFMModel.java:74)
>     freemarker.core.Environment.visit(Environment.java:389)
>     freemarker.core.UnifiedCall.accept(UnifiedCall.java:104)
>     freemarker.core.Environment.visit(Environment.java:324)
>     freemarker.core.MixedContent.accept(MixedContent.java:54)
>     freemarker.core.Environment.visit(Environment.java:324)
>     freemarker.core.Environment.process(Environment.java:302)
>     freemarker.template.Template.process(Template.java:325)
>     org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:233)
>     .....
>
> As far I understand it requires FreemarkerServlet to be registered
> (Struts doesn't use it) and also FM Environment must have Tiles model
> registered already :(

Problem solved! I had to register dedicated JSP servlet to support this :)


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

Mime
View raw message