<%Date date2 = new Date();
Timestamp ts2 = new Timestamp(date2.getTime());
String str="test";
%>
<s:label name="todo.todotime" value="<%=ts2 %>"></s:label><%=ts2 %></td>为什么会错?
<s:date 标签怎么得到当前的时间,并设置name=todo.todotime"
Timestamp ts2 = new Timestamp(date2.getTime());
String str="test";
%>
<s:label name="todo.todotime" value="<%=ts2 %>"></s:label><%=ts2 %></td>为什么会错?
<s:date 标签怎么得到当前的时间,并设置name=todo.todotime"
<table>
<tr>
<td>时间:</td>
<td> <%Date date2 = new Date();
Timestamp ts2 = new Timestamp(date2.getTime());
%>
<label name="todo.todotime"><%=ts2 %></label>
</td>action.java里的代码:
public String todo() throws Exception{
/* Date date2 = new Date();
Timestamp ts2 = new Timestamp(date2.getTime());
todo.setTodotime(ts2);*/
todoService.save(todo);
return SUCCESS;
}为什么todo.todotime还是空的?
不是表单元素的控件的值怎么能提到过去呢.?