Struts开发问题集锦

在struts2de 1.6以前版本,都是用<s:datepicker>标签来获取时间,1.8后可以用struts-dojo.plugin里的<sx:datetimepicker>标签获取时间。

1.struts2-dojo-plugin-2.1.6.jar引入到自己的项目中。 
2.jsp中加入如下内容 
<%@ page language="java" pageEncoding="UTF-8"%> 
<%@ taglib prefix="s" uri="/ struts-tags" %> 
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> 
3. <head>中加入下列 

<head> 
    <s:head theme="xhtml"/> 
    <sx:head parseContent="true"/>       
</head> 
4.页面中使用 
<sx:datetimepicker name="birthday" lable="请求时间" displayFormat="yy-MM-dd" /> 

原文地址:https://www.cnblogs.com/dyllove98/p/3161512.html