为什么不使用#来取值?
下面是老师的PastAction的部分代码
public String getPageBeanByCondition() throws Exception {
// 如果用户传递的start为空,那么我们将时间设置为0001-01-01
if (start.isEmpty()) {
start = "0001-01-01";
}
// 如果用户传递的end为空,那么我们将时间设置为9999-12-31
if (end.isEmpty()) {
end = "9999-12-31";
}
//得到pageBean
PageBean pastePageBean = pasteService.getPageBeanByCondition(end,start,currentPage,paste.getTitle(),isDelete,paste.getSolve());
//数据的回显
ActionContext.getContext().put("start", start);
ActionContext.getContext().put("end", end);
ActionContext.getContext().put("title", paste.getTitle());
//页面的信息
ActionContext.getContext().put("pastePageBean", pastePageBean);
ActionContext.getContext().put("isDelete", isDelete);
ActionContext.getContext().put("solve", paste.getSolve());
return "pasteList";
}
在老师写的PasteAction类中没有 title 这个私有属性字段, 而且是title存在Strust2的值栈 中
但是在老师给的项目的paste-list.jsp页面中却出现了取值不用#的情况 请问这是不是一个老师放的错误?
<input type="text" name="title" placeholder="请输入标题" autocomplete="off" class="layui-input" value="<s:property value="title"/>">


