No tag " " defined in tag library imported with prefix="s"

页面错误提示: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" /> 


No tag "tree" defined in tag library imported with prefix="s"
原因:struts2.1.8 把struts2.0中的和ajax相关的,如tree,treenode 移动到了dojo中了 
解决方法如下: 
1. 到struts-2.1.8\lib下找到struts2-dojo-plugin-2.1.8.jar 复制到你的项目/WEB-INF/lib 下
2、在jsp页面中加入<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
3、将<s:tree label="XXXX"  ></s:treer>改为<sx:tree label="XXXX" ></sx:treer>
也许这时你还会发现有个黄色的小警告,也许是你的标签中加入了 theme="ajax",去掉即可。




转载于:https://www.cnblogs.com/zongzhankui/archive/2011/07/05/5875352.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值