• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic