Re: disableCanonicalPathCheck and spring framework
Daniel Dekany <[email protected]> Sat, 4 Jun 2016 09:59:29 +0200
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
What do you have so far, or where do you stuck? I suppose you are
creating a FreeMarkerConfigurer somewhere. In a Java config? Then
perhaps you will have something like this:
@Bean FreeMarkerConfigurer freeMarkerConfigurer() {
FreeMarkerConfigurer fmc = new FreeMarkerConfigurer();
...
fmc.setPreTemplateLoaders(new FileTemplateLoader(templatesDir, true));
...
}
But I'm not sure if you really should use a FileTemplateLoader at all.
What's the use case? Why's disableCanonicalPathCheck needed?
BTW, where did you find this retired mailing list address? Both
http://freemarker.org/mailing-lists.html and
https://sourceforge.net/p/freemarker/mailman/?source=navbar says that
this list is retired, yet most people still uses this instead of
[email protected]. I just want to know if we have
some links left without retirement notice or something.
Friday, June 3, 2016, 8:25:29 PM, Mario Gzuk wrote:
> Hi Daniel,
> thank you for this fast answer. I am very new to this, so excuse me if I
> ask you for an example for this. Is it possible for you to show me an
> example or point me to a documentation about this? The people which I am
> asking for it say it is too complicated, or it is not possible to do it
> in any way...
>
> Regards Mario
>
> Am 03.06.2016 um 19:23 schrieb Daniel Dekany:
>> I think you can only set it if you specify a TemplateLoader object
>> directly, instead of using the templateLoaderPaths (where you are
>> using String-s). That can be achieved by setting the
>> preTemplateLoaders or postTemplateLoaders property of any
>> FreeMarkerConfigurationFactory subclass.
>>
>>
>> Friday, June 3, 2016, 1:46:49 PM, Mario Gzuk wrote:
>>
>>> Hi,
>>> maybe a simple question, but I cant find a solution how to set
>>> disableCanonicalPathCheck for freemarker in conclusion with the spring
>>> framework. I found a lot of documentation about how to configure it,
>>> e.g.
>>> http://docs.spring.io/autorepo/docs/spring/current/javadoc-api/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurer.html
>>
>
--
Thanks,
Daniel Dekany
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e