freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dekany (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FREEMARKER-46) Empty value
Date Fri, 24 Feb 2017 17:34:44 GMT

    [ https://issues.apache.org/jira/browse/FREEMARKER-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15883155#comment-15883155
] 

Daniel Dekany commented on FREEMARKER-46:
-----------------------------------------

Very strange. I don't yet see any reason for this to not work, and especially to be environment
dependent (if I understood well, the application works well in one environment, and has the
reported problem in another). Is the output shown from the same environment where application
shows the default values?

What does this display:

{code}
<#list titoli as titolo>
  <tr>
   <td>${titolo}</td>
  </tr>
</#list>
{code}

The example code you have given misses the part where you actually add the array to {{data}},
and process the template.
It's certainly more efficient if you create and attach a minimal standalone application (you
know, just a console app with a main method) that actually runs, and reproduced the problem,
instead of copy-pasting snippets.

> Empty value
> -----------
>
>                 Key: FREEMARKER-46
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-46
>             Project: Apache Freemarker
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 2.3.23
>         Environment: Java 1.8, Tomcat 8.0.15
>            Reporter: Leonardo Zorzi
>            Priority: Critical
>
> Sorry for my bud english.
> I've installed freemarker in develop enviroment (java 1.8, tomcat 8.0.15, Windows 7)
and all is ok. When put software in production (jdk 1.8, tomcat 8.0.31, Windows Server 2008)
don't work.
> The template:
> <#list titoli as titolo>
> 			<tr>
> 				<td>${(titolo.argomento1)!"default text"}</td>
> 				<td>${(titolo.argomento2)!"default text"}</td>
> 				<td>${(titolo.argomento3)!"default text"}</td>
> 				<td>${(titolo.nome)!"default text"}</td>
> 				<td>${(titolo.titolo)!"default text"}</td>
> 				<td>${(titolo.tipo)!"default text"}</td>
> 			</tr>
> 			</#list>
> In develop is ok, in production all field are "default text" and the number of row is
the same. (the origin of data is the same, and the beans are full with correct data!)
> What is the problem!?
> Thank you!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message