六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 32|回复: 0

No tag "datetimepicker" defined in tag library imported with p

[复制链接]

升级  52.67%

37

主题

37

主题

37

主题

秀才

Rank: 2

积分
129
 楼主| 发表于 2013-1-29 10:51:11 | 显示全部楼层 |阅读模式
错误提示: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.项目中引入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" value="%{date}" displayFormat="yy-MM-dd" />
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表