在bean中是一个日期格式,要求显示在页面时的格式为:2009-09-11。方法如下:
使用struts2自带的标签库
(1)在jsp开头加入[color=green]:<%@ taglib prefix="s" uri="/struts-tags"%>[/color]
(2)页面这样写[color=red]:<input type="text" value="<s:date name="swbltljl.createTime" format="yyyy-MM-dd" />" />[/color]
这样就会在页面显示成2009-09-11这样的格式。
使用struts2自带的标签库
(1)在jsp开头加入[color=green]:<%@ taglib prefix="s" uri="/struts-tags"%>[/color]
(2)页面这样写[color=red]:<input type="text" value="<s:date name="swbltljl.createTime" format="yyyy-MM-dd" />" />[/color]
这样就会在页面显示成2009-09-11这样的格式。