Hello everyone,

I would like to ask if there is a bug in new struts 6.0.0 version for struts jquery chart tag (sjc).

After upgrade from struts 2.5.30 to 6.0.0 (replaced struts 2.5.30 with 6.0.0), everything is fine except the chart, which works fine with struts 2.5.30

Here are errors:

 2022-Jun-13 12:05:44.988 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - Could not load the FreeMarker template named 'chart':  2022-Jun-13 12:05:44.990 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - Attempted: /template/jquery/chart.ftl  2022-Jun-13 12:05:44.991 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - Attempted: /template/xhtml/chart.ftl  2022-Jun-13 12:05:44.991 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - Attempted: /template/simple/chart.ftl  2022-Jun-13 12:05:44.991 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - The TemplateLoader provided by the FreeMarker Configuration was a: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader freemarker.core.ParseException: Syntax error in template "template/jquery/chart.ftl" in line 22, column 43: Using ?html (legacy escaping) is not allowed when auto-escaping is on with a markup output format (HTML), to avoid double-escaping mistakes. 2022-Jun-13 12:05:44.991 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.ClosingUIBean - Could not open template  2022-Jun-13 12:05:45.005 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - Could not load the FreeMarker template named 'chart-close':  2022-Jun-13 12:05:45.005 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - Attempted: /template/jquery/chart-close.ftl  2022-Jun-13 12:05:45.005 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - Attempted: /template/xhtml/chart-close.ftl  2022-Jun-13 12:05:45.005 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - Attempted: /template/simple/chart-close.ftl  2022-Jun-13 12:05:45.005 [http-bio-8080-exec-3] ERROR org.apache.struts2.components.template.FreemarkerTemplateEngine - The TemplateLoader provided by the FreeMarker Configuration was a: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader

Here is file  chart.jsp

            <display:column title="Chart" sortName="indicator_id" sortable="true" style="text-align:center">
               <sjc:chart
                    cssStyle="width: 300px; height: 200px;"
                    legendShow="true"
                    pie="true"
                    pieLabel="true"
                    >
                    <s:iterator value="%{#attr.row.data_map_chart}">
                        <sjc:chartData label="%{key}" data="%{value}" />
                    </s:iterator>
                </sjc:chart>
            </display:column>


I do have these libs + dependencies:

     . commons-fileupload-1.4.jar
     . commons-lang3-3.10.jar
     . freemarker-2.3.31.jar
     . log4j-api-2.17.2.jar
     . ognl-3.3.2.jar
     . struts2-jfreechart-plugin-6.0.0.jar

     . struts2-jquery-chart-plugin-4.0.2.jar
     . struts2-jquery-plugin-4.0.3.jar
     . jfreechart-1.0.19.jar
     . jcommon-1.0.23.jar


Any help or suggestion is appreciated. Thanks.

--
Que Nguyen


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to