如何在 freemarker 模板中使用 Integer?
昨天,当我尝试从操作中获取变量值时, 如果我将 ftl 值中定义的变量设置为低于 10 ,结果总是为空。
<input type="hidden" name="orderId" id=orderId" value="9" />
public class OrderVo {
private Long id;
public Long getId() { return this.id; }
public void setId(Long id) { this.id = id; }
}
System.out.println("=============================" +vo.getOrderId());
the result was ""
一开始谢谢你,但是没用。 我前天就收到了! 因为为了tomcat的发布。 你可能会在tomcat 6.x中遇到问题,但在5.x中不会。
Yesterday, when I attempted to get a variable value from action,
if I set the variable's which defined in ftl value up to below ten , the result always got empty.
<input type="hidden" name="orderId" id=orderId" value="9" />
public class OrderVo {
private Long id;
public Long getId() { return this.id; }
public void setId(Long id) { this.id = id; }
}
System.out.println("=============================" +vo.getOrderId());
the result was ""
Thank you at first,but it doesn't work.
I got it the day before yesterday!
Because for the release of the tomcat.
You may come across problem in the tomcat 6.x,but not 5.x.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅 freemarker 手册中的以下部分。
http://freemarker.sourceforge.net/docs/ref_builtins_number.html
干杯。
Please see the following section in the freemarker manual.
http://freemarker.sourceforge.net/docs/ref_builtins_number.html
Cheers.