java.lang.NoClassDefFoundError:org/apache/commons/beanutils

news/2024/7/5 23:56:32 标签: struts, header, menu, 服务器, 框架

 

解决Struts2.0学习笔记(三)中 tiles框架配置问题

(1)       解决错误:java.lang.NoClassDefFoundError:org/apache/commons/beanutils

/DynaProperty

拷贝commons-beanutils-1.7.0.jarWEB-INF/lib目录下

2)更改tiles.xml的文件头为

<!DOCTYPE tiles-definitions PUBLIC

       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"

       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">

<tiles-definitions>

    <definition name="mydefinition1" template="/template.jsp">   

       <put-attribute  name="header" value="/logo.jsp"/>

      <put-attribute  name="menu" value="/logo.jsp"/>

      <put-attribute  name="body" value="/welcome.jsp"/>     

    </definition>   

   

     <definition  name=".sindex"  extends="mydefinition1">

      <put-attribute  name="body"  value="/welcome.jsp"/>

  </definition>

</tiles-definitions>

而不是以前的

<!DOCTYPE tiles-definitions PUBLIC

       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"

       "http://jakarta.apache.org/struts/dtds/tiles-config.dtd">

注意划线部分的区别,若是下面这种的话在定义definition的时候就只能用<put>而不是

<put-attribute>

 

(3)web.xml中加入如下代码:

<context-param>       <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>

       <param-value>/WEB-INF/tiles.xml</param-value>

</context-param>

 

重新发布,启动服务器不再出错~

收集于:

http://www.talentdgger.cn/home/space.php?uid=1064&do=blog&id=10602


http://www.niftyadmin.cn/n/1051514.html

相关文章

判断银行卡是储蓄卡还是信用卡

根据银行卡号区分信用卡还是储蓄卡 2018年02月28日 19:08:36 阅读数&#xff1a;1114https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charsetutf-8&cardBinChecktrue&cardNo‘.$acctNo 这是支付宝的一个接口&#xff0c;直接跟上要查看的卡号就行。…

CSS 技巧总结

CSS 技巧和经验列表 1. 如何清除图片下方出现的几像素的空白 方法一&#xff1a; img{display:block;}方法二&#xff1a; img{vertical-align:top;} 除了top值&#xff0c;还可以设置为text-top | middle | bottom | text-bottom&#xff0c;甚至特定的<length>和<pe…

系统热键分析 TWO - 取热键对应的进程名

又是系统热键分析,静静的夜里分析起来,比打麻将时间过得快...typedef struct tagHOTKEY {W32THREAD pti; x /t /v /q /d win32k!gphkFirst pub global bf9b0bd8 0 !"win32k!gphkFirst" lkd> dd /c 6 dwo(win32k!gphkFirst) L6 e10687d8 e29749…

集成 Struts、Tiles 和 JavaServer Faces-JSP教程,Java技巧及代码

内容&#xff1a;jsf 简介为什么将这三者集成为一体&#xff1f;将 struts 和 jsf 和 struts-faces 集成将struts 应用程式移植到 jsf集成 struts-faces 和 tiles 的挑战到目前为止所作的改动参考资料 作者简介对本文的评价相关内容&#xff1a;struts, an open-source mvc imp…

HDU 1880 魔咒词典 (Hash)

魔咒词典 Time Limit: 8000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16641 Accepted Submission(s): 3916 Problem Description哈利波特在魔法学校的必修课之一就是学习魔咒。据说魔法世界有100000种不同的魔咒&#xff0…

分享:libmemcached 1.0.17 发布,memcached 开发包

libmemcached 1.0.17 发布&#xff0c;memcached 开发包 http://www.oschina.net/news/39278/libmemcached-1-0-17

子线程导致 Windows 服务停止的情况(Topshelf 结合 Quartz.NET)

前言 本文主要记录子线程导致 Topshelf 和 Quartz.NET 的 Windows 服务停止的现象&#xff0c;以及使用几种常用子线程的注意事项。因为我们有时可能需要开启多个线程执行复杂的逻辑&#xff0c;如果某个子线发生了异常就导致服务停止了&#xff0c;那还怎么愉快的玩耍&#xf…