2
昨天,当我试图从行动中获得一个变量值时,如果我将定义在ftl值中的变量设置为10以下,结果总是为空。如何在freemarker模板中使用Integer?
<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.
您需要提供更多信息。缺少报价是否有错字?你是说你*输入* 10,还是将该值设置为10,并希望它出现在模板中? –