• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Sijesh Alayaril
Ranch Hand
Posts: 90
  • 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,
       1.struts2-core-2.0.11.2.jar
       2.struts2-jquery-plugin-3.5.0.jar
       3.freemarker-2.3.8.jar

Here is my JSP File

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

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

Any help would be highly appreciated.



Kind Regards,
Sijesh



FreeMarker.png
[Thumbnail for FreeMarker.png]
 
Tim Moores
Saloon Keeper
Posts: 4034
94
  • 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 2.0.11.2 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.
 
Dave Tolls
Ranch Foreman
Posts: 3062
37
  • 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!