gospodin
gospodin

Reputation: 1201

freemarker and struts2 tags

I am trying to use struts2 tags in freemarker template (jboss server).

Somewhere I saw that its simple, just instead of

Problem is that after trying to load my ftl with the code

<@s.form id="testId" namespace="/">
  <@s.select label="What's your favor search engine"
      name="roomModif[0].type"
      value="modifiedRooms[0].type"
      list="searchEngine" />
</@s.form>

i have exception

[FreemarkerTemplateEngine] Could not load the FreeMarker template named 'form':
[FreemarkerTemplateEngine] Attempted: /template/xhtml/form.ftl
[FreemarkerTemplateEngine] Attempted: /template/simple/form.ftl
[FreemarkerTemplateEngine] The TemplateLoader provided by the FreeMarker 
 Configuration was a: freemarker.cache.FileTemplateLoader
[ClosingUIBean] Could not open template
java.io.FileNotFoundException: Template /template/xhtml/form.ftl not found.

Can someone tell me what am i missing in my configuration?

Upvotes: 1

Views: 2120

Answers (1)

jedik
jedik

Reputation: 1244

First steps:

Do you have struts2-core.jar in your war in Web-inf/lib?

If so, can you locate "template/xhtml/form.ftl" or "template/simple/form.ftl" in that jar?

If not, you have a problem with struts2-core library. Make sure you use the latest version of Struts2.

Upvotes: 1

Related Questions