zoukankan      html  css  js  c++  java
  • 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",去掉即可。




    如果觉得本文对您有帮助,请“打赏”,谢谢。
    您的鼓励,我的动力。
    微信 支付宝
  • 相关阅读:
    I-string_2019牛客暑期多校训练营(第四场)
    hackerrank Palindromic Border
    hackerrank Circular Palindromes
    uoj424
    bzoj5384
    uoj450
    QTP 表格的导入导出异常信息 笔记
    QTP基本循环异常遍历(代码方式实现)
    QTP基本循环正常遍历(代码方式实现)
    《大道至简》读后感
  • 原文地址:https://www.cnblogs.com/zongzhankui/p/5875352.html
Copyright © 2011-2022 走看看