Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

freemarker.template.TemplateException: Error reading included file template/simple/dynamic-attribute  RSS feed

Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

   I'm new to struts2 and while creating a dynamic menu I'm getting below exception, and the exception says "freemarker.template.TemplateException: Error reading included file template/simple/dynamic-attributes.ftl".

Please find the attached image for jar file used in application.

Error reading included file template/simple/dynamic-attributes.ftl
The problematic instruction:
==> include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" [on line 30, column 1 in template/jquery/menu.ftl]

Java backtrace for programmers:

Is this issue is due to any jar compatibility? also I'm using following jar files,

Here is my JSP File

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
<title>Struts 2 - Login Application |</title>
<h2>Struts 2 - Login Application sdfsdf</h2>
<sj:menu id="menuWithItems" cssStyle="width:50%">

while using <sj:menu> tag in jsp page I'm getting above error.

Any help would be highly appreciated.

Kind Regards,

[Thumbnail for FreeMarker.png]
Saloon Keeper
Posts: 5057
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So: where is the file dynamic-attributes.ftl? Describe your directory structure. As a wild guess, the "/" in front of "/${parameters.templateDir}" looks suspicious, but without knowing what's where it's impossible to say.

Also, both Struts and FreeMarker 2.3.8 are wildly out of date, with the former having serious security problems (exploited at Equifax and elsewhere) - you should start by upgrading those to the latest released versions.
Posts: 3772
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking up your version of the jquery plugin I would say that you should be using a later version of the core Struts 2.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!