struts 2.1.7的时间标签报错:datetimepicker

No tag "datetimepicker" defined 解决方法

错误提示:org.apache.jasper.JasperException: /struts2/index.jsp(16,3) No tag "datetimepicker" defined in tag library imported with prefix "s"

原因:struts2.1.6 把struts2.0中的和ajax相关的,如datetimepicker,tree,treenode 都移动到了dojo中了

解决方法(三步走):
1、在jsp文件中加入<%@ taglib uri="/struts-dojo-tags" prefix="sx"%>和<sx:head/>

2、将<s:datetimepicker label="XXXX" name="XXXX"></s:datetimepicker>改为<sx:datetimepicker label="XXXX" name="XXXX"></sx:datetimepicker>

3、将struts2-dojo-plugin-2.1.6.jar拷贝到/web-inf/lib下

你可能感兴趣的:(apache,Ajax,jsp,struts,dojo)