Re: Cannot load template in Linux using Spring FreeMarkerConfigurationFactory
Peter Kleczka <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <CAA99P1HH61OO=mvdvbDgvr6abAs5wDoXybS5L=sZ2aUCVhtdcw@mail.gmail.com> |
Problem solved. User misconfiguration -- I hate it when that happens :) Thanks to everyone who provided suggestions. On Wed, Feb 22, 2012 at 11:07 PM, Daniel Dekany <[email protected]> wrote: > This is more a Spring question than a FreeMarker question. Maybe you > should look into the source code of FreeMarkerConfigurationFactory and > of the TemplateLoader implementation that Spring uses to find out > what's going on. > > -- > Best regards, > Daniel Dekany > > > Wednesday, February 22, 2012, 10:12:59 PM, Peter Kleczka wrote: > > > Hi > > > > I have a web app on Tomcat 6 that loads FreeMarker templates via > > org.springframework.ui.freemarker.FreeMarkerConfigurationFactory. > > The web app is plain JSP (not Spring MVC). The app works fine in a > > Windows environment, but will not work on Linux (Slackware 13.37 64 > > bit). When I run it on Linux it gives me a file not found exception. > > I have tried multiple variations on this configuration including > > putting my templates directory in the classpath, using Spring > > prefixes like "file:" and "classpath:" for the templateLoaderPath. > > Nothing has worked. Please let me know if you have any ideas to fix. > Thanks, Peter. > > > > <!-- Freemarker template config factory. Works on Windows --> > > <bean id="freemarkerTemplateConfigFactory" > > class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactory"> > > <property name="templateLoaderPath" value="/WEB-INF/ftemplates/" > /> > > </bean> > > > > <bean id="templateService" > > class="com.mypkg.service.TemplateService"> > > <property name="configurationFactory" > > ref="freemarkerTemplateConfigFactory" /> > > </bean> > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user > ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ FreeMarker-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freemarker-user