Freemarker 1 « Development « Spring Q&A





1. Template Engines for Spring Framework    stackoverflow.com

I've taken quite a shine to the Spring Framework and would like to get into it a bit more. I have noticed that aside from plain vanilla JSPs there are various ...

2. Getting template text from FreeMarker in Spring app    stackoverflow.com

In my Spring app, I'd like to use FreeMarker to generate the text of emails that will be sent by my application. The generated text will never be returned to the ...

3. Ouput XML with Freemarker    stackoverflow.com

We are using freemarker for templates in our web application. We are using spring's FreeMarkerViewResolver for this. Is there a way in freemarker to change the content type on the response to ...

4. Freemarker template not found    stackoverflow.com

I'm currently trying to get Freemarker to work with my application using Spring. No matter what I try I keep getting template not found. I am not sure if ...

5. using freemarker and spring to construct templates    stackoverflow.com

I am new to freemarker. I have a spring application that I am planning to use with freemarker. Templates will be stored in database and based on the login, ...

6. Get templates from freemarker using Spring    stackoverflow.com

I have started by looking in following thread - http://stackoverflow.com/questions/230763/getting-template-text-from-freemarker-in-spring-app My spring configuration -

<bean id="fmConfig" class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean"> 
    <property name="templateLoaderPath" value="/WEB-INF/templates"></property> 
</bean>

<bean name="/email.do" class="com.email.web.controller.EmailController">
  <property name="formView" value="email"/>
  <property ...

7. spring binding formmultiselect    stackoverflow.com

I'm trying to bind multiselect to my object. The form is created and the post works and no errors occur when I don't select anything. If I select a language the ...

8. Help setting up YUI Compressor with maven, spring, freemarker etc. for different environments (test/development/production)    stackoverflow.com

I am almost done setting my project to use normal javascript files or the min versions for different environments, but there's one thing I can't figure out - at least not ...

9. Spring Freemarker Configuration, Template Not Found    stackoverflow.com

I have a Spring/JSF Web application which has a dependency to a module uses Freemarker templates. Here is what i did for integration: I imported the applicationContext-freemarker-module.xml to applicationContext.xml I added the configuration ...





10. override @spring.showErrors to show single error?    stackoverflow.com

hi guys i am new to freemarker and not very familiar with it and i need a little help in overriding the following code, to show only one error instead of list of ...

11. How do I replace carriage returns with
using freemarker and spring?
    stackoverflow.com

I've got an internationalised app that uses spring and freemarker. I'm getting content from localised property files using.

${rc.getMessage("help.headings.frequently_asked_questions")}
For some of the content there are carriage returns in the property values. Because ...

12. How do I do substitutions for localised strings in freemarker    stackoverflow.com

I'm using spring and freemarker and have the basics working. I've got a properties file like

help.text=For further information please see the <a href="{0}">help page</a>.
I'm currently outputting localised messages using
${rc.getMessage("help.text")}
However I'm having trouble ...

13. Spring Freemarker render "includes" individually    stackoverflow.com

I have a freemarker template (index.ftl) with an include (page1.ftl and page2.ftl) inside it:

this is the sample content on index.ftl
<#include "/pages/page1.ftl">
<#include "/pages/page2.ftl">

blablabla contents here
In my spring environment, I extended the class ...

14. Load freemarker template from classpath and filesystem in Spring    stackoverflow.com

In Spring can we load freemarker template in both filesystem and classpath?? All of the pages of web application we put in jar bundle, Spring will lookup in filesystem first if ...

15. Validation errors in freemarker    stackoverflow.com

I try to write password validator with spring and freemarker. BindingResult see errors, but they not showing - spring.status.errorMessages?size returns 0. Validator get correct passwords, because I checked. PasswordForm is a java ...

16. freemarker templates in several jars    stackoverflow.com

How can I configure freemarker to search templates in several jars? With spring.

<!-- freemarker config -->
<bean id="freemarkerConfig"
    class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
    <property name="templateLoaderPaths" value="classpath:/freemarker/" />
</bean>
One war file (to ...





17. How to do Pagination using Freemarker and Spring?    stackoverflow.com

I have a Freemarker template displaying a list of things, now I want to add some pagination. I have changed the server-side code so that I can put into the ...

18. Locale support with Freemarker    forum.springsource.org

Locale support is pretty good with FreeMarker. You have several choices. If your app is a non-web app, you can specify a locale for template rendering by adding a 'freemarkerSetting' property ...

19. Using taglibs in freemarker    forum.springsource.org

There was a similar request on the FreeMarker lists a couple of days ago - I didn't know you could do that until I saw that post. The documentation for this ...

20. Freemarker template load path problems    forum.springsource.org

I'm trying to write a crude plugin system with web flow and freemarker. Web Flow works fine loading the flow definitions from my plugin jars in the standard directory structure I ...

21. Eclipse 3.0 error in freemarker view when none is present?    forum.springsource.org

Eclipse 3.0 error in freemarker view when none is present? Hi there all, I'm using Eclipse 3.0 with 'Build Project Automatically'. In a freemarker template, Eclipse reports an error (little red ...

22. Spring 3 + Freemarker formCheckboxes conversion problem    forum.springsource.org

Spring 3 + Freemarker formCheckboxes conversion problem Hi! I'm using Spring 3 MVC + Freemarker and am facing a following problem. On my page I have Code: <@spring.formCheckboxes "book.authors", authors, "

23. bug? -- freemarker/spring.ftl: formMultiSelect    forum.springsource.org

bug? -- freemarker/spring.ftl: formMultiSelect The docs in chapter 13 of the documentation suggest that you can pass a map object as the options parameter to the "formMultiSelect" macro: Originally Posted by ...

24. Mixing JSP/Freemarker and tiles...    forum.springsource.org

Mixing JSP/Freemarker and tiles... Hi, We have an existing JSP/tiles based system that we would like to slowly evolve to Freemarker. We are using Spring 3.0.5 so we can chain the ...

25. unit testing Freemarker and Spring    forum.springsource.org

I have a freemarker template and I want to write a test that checks the output for a given model input. Code: @Test public void testProcessTemplateWithModel() throws Exception { final Configuration ...

26. Spring 3 + Freemarker binding issue    forum.springsource.org

I am facing a problem with <@spring bind ... /> macro in FTL . Question 1 : is <@spring bind .. /> macro adhere to Java 5 features ? Let me ...

27. Spring 3.1 + Tiles + Freemarker    forum.springsource.org

PHP Code: ...

28. Freemarker Spring Macro problem    forum.springsource.org

Freemarker Spring Macro problem Hi, I have some problems getting the Spring Freemarker macros to work: this is my code: servlet.xml Code: views_ftl <@form.errors path="foobar" cssClass="error" /><#-- doesn't output anything -->

69. Extension to FreeMarker macro formSingleSelect    forum.springsource.org

Extension to FreeMarker macro formSingleSelect Greetings to all Spring Framework developers, I would like to enhance the FreeMarker macro formSingleSelect which is included with Spring distribution in spring.ftl and binds values ...

70. Spring freemarker    forum.springsource.org

I am using spring & freemarker. But I am not able to do field validation. execution is going to validator class and the same view is displayed with no values and ...

71. Different directories for templates Freemarker    forum.springsource.org

Hi everybody, I'd like to have separate directories for the templates, I mean, for example, WEB-INF/freemarker/en for templates in english WEB-INF/freemarker/fr for templates in french .... So How can I configure ...

72. Freemarker: JspTaglibs is undefined    forum.springsource.org

Freemarker: JspTaglibs is undefined Hi all, i'm trying to add portlet related jsp tags to my freemarker template, but get JspTaglibs is undefined exception from Freemarker. As of http://opensource.atlassian.com/proj...rowse/SPR-1052 this should ...

73. Unit testing Freemarker templates using JspTaglibs    forum.springsource.org

I am using Freemarker as view in Spring MVC. My freemarker templates are using JspTagLibs . Is there any standard practice to unit test Freemarker templates which has reference to JspTagLibs ...

74. FreeMarker + JspTagLib    forum.springsource.org

Hello all, I am porting a set of jsp pages to FreeMarker. I would like to use struts menus in my FreeMarker views, for a Spring application. To do so, I ...

75. Spring binding in FreeMarker not working    forum.springsource.org

Spring binding in FreeMarker not working I'm trying to create a simple login form with programatic validations using freemarker. In my Login controller I need to return back to login page ...

76. Can freemarker template include external content?    forum.springsource.org

Can freemarker template include external content? Hi Guys, I am using freemarker template for my view rendering. I want to include a extenral JSP in one of my template, but it ...

77. Freemarker convert XML into Java object    forum.springsource.org

Is it possible to convert the java object from XML using Freemarker template ? if yes please give me the step. Appreciate any body who are response me Boz i want ...

78. Portlet tag using freemarker template    forum.springsource.org

Portlet tag using freemarker template Hi all, Iam developing a portlet application with spring portlet mvc using Freemarker template. Iam facing a issue with using portlet renderURL and actionURL tags inside ...

79. formLabel macro for Freemarker?    forum.springsource.org

I wrote my own formLabel macro. I enhanced it to add the cssErrorClass Code: <#-- * formLabel * The Spring Framework FTL macro library does not have this so I had ...

80. Client side validation with FreeMarker?    forum.springsource.org

Hi I'm using Spring MVC and FreeMarker template. Is the Spring Module's Client side validation available for FreeMarker? Could you point me some examples? Thank you!

81. NestedPath and Velocity (&Freemarker?)    forum.springsource.org

NestedPath and Velocity (&Freemarker?) jira.springframework.org/browse/SPR-4986 I submitted a patch to give back end support to make it trivial to add a macro for Velocity to support a nestedPath tag like the ...

82. get FreeMarker template content    forum.springsource.org

get FreeMarker template content Hi, I'd like to use FreeMarker to generate the text of emails that will be sent by my application. The generated text will never be returned to ...

83. Accessing path info using freemarker    forum.springsource.org

Accessing path info using freemarker Hi, I'm trying to access the url path that is entered in the browser through freemarker and I'm not having any luck. Looping over the available ...

84. Tiles and Freemarker    forum.springsource.org

Tiles and Freemarker Is it possible to use Tiles and freemarker pages together with Spring MVC? I tried doing this and no luck. I want to use freemarker to create the ...

85. Is there a freemarker form tag library for spring?    forum.springsource.org

Thanks. I eventually coded my own based on the ftl macro's written by Jeurgen that suited my application needs. Strangely when I read the documentation before, it didn't go on that ...

86. Spring 3.0.0.M3 FreeMarker Problem    forum.springsource.org

Hi, I am getting the following error when returning a ModelAndView with a freemarker view. Code: java.lang.IllegalAccessError: tried to access method freemarker.ext.servlet.AllHttpScopesHashModel.(Lfreemarker/template/ObjectWrapper;Ljavax/servlet/ServletContext;Ljavax/servlet/http/HttpServletRequest;)V from class org.springframework.web.servlet.view.freemarker.FreeMarkerView This only occurs with the new ...

87. freemarker bindings    forum.springsource.org

freemarker bindings I'm having a hard time grasping how bindings work. I take it that it's a psudo state machine, that when you say bind, it binds to the next field ...

88. Bug in freemarker view encodig?    forum.springsource.org

89. Final thing: How can I get content negotiator to render freemarker as default in 3.0?    forum.springsource.org

Sep 19th, 2009, 11:01 AM #1 mystic View Profile View Forum Posts Private Message Senior Member Join Date May 2009 Posts 246 Final thing: How can I get content negotiator to ...

90. Freemarker via spring.ftl unable to specify field ids    forum.springsource.org

Freemarker via spring.ftl unable to specify field ids Hi all, I'm using Spring 2.5.6 and was wondering if someone can help me understand how to use the spring.ftl form fields properly. ...

91. Freemarker login form.    forum.springsource.org

92. How to JSP tags defined in freemarker template available in final view    forum.springsource.org

How to make JSP tags defined in freemarker template available in final view Hi All I am having a few problems with importing jsp tags into my freemarker templates and i ...

93. Spring 3 and freemarker problem    forum.springsource.org

Hi. I have problem with spring 3 rc2 and freemarker. My old code is not working. [@spring.bind path="user.roles" /] [#list spring.stringStatusValue as role] do something with role [/#list] Error: freemarker.template.TemplateException: Expected ...

94. Freemarker including jsp page in spring 2.0    forum.springsource.org

Freemarker including jsp page in spring 2.0 Hi Guyes, We have started implementing views using freemarker in our project. we are using spring 2.0 and i was able to configure and ...

95. Validation Framwork and Freemarker    forum.springsource.org

Validation Framwork and Freemarker I'm working with org.springframework.validation with Spring 3MVC Portlets. I use a BindingResult and run validator.validate(myObject, bindingResult). I set model.addAttribute("foo", bindingResult.getAllErrors.size()) and I can get the correct number ...

96. Configuring freemarker object wrapper    forum.springsource.org

Configuring freemarker object wrapper How do I configure the freemarker object wrapper in spring to use the beans wrapper? I've tried the following, but it doesn't seem to have any effect. ...

97. Using jsp taglibs in freemarker view    forum.springsource.org

Freemarker supports using JSP taglibs. But I am wondering is it possible to use JSP taglibs with Spring's freemarker view !! This is a must have feature, Spring should support using ...

98. Use paremeter as methodname in freemarker functions    forum.springsource.org

<#function contains list item itemValue> <#list list as nextInList> <#if nextInList.${itemValue} == item?number><#return true> <#return false>

99. FreeMarker Template Decorator    forum.springsource.org

FreeMarker Template Decorator Hi, I am using Spring MVC coupled with FreeMarker as viewing technology in a current web project and was looking for an easy way to decorate all of ...

100. GNU gettext and Freemarker    forum.springsource.org

GNU gettext and Freemarker Is anyone using GNU gettext with SpringMVC and in Freemarker templates? I don't imagine it's too hard, I'm just not sure where to hook in the gettext ...