首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

平添struts2需要的必备包

2012-10-16 
添加struts2需要的必备包添加struts2的时候,只添加core包还不行,初始化web.xml的时候会报ClassNotFoundExc

添加struts2需要的必备包
添加struts2的时候,只添加core包还不行,初始化web.xml的时候会报ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher的异常,需要将以下四个包添加才可以。
struts2-core-2.0.14.jarxwork-2.0.7.jarfreemarker-2.3.8.jarognl-2.6.11.jar
与spring整合需要添加以下包
spring.jarcommons-logging-1.1.jaraspectjweaver-1.5.3.jarstruts2-spring-plugin-2.0.6.jar
与spring整合,在web.xml中,除了配置
org.springframework.web.context.ContextLoaderListener
监听,还要配置
org.springframework.web.context.request.RequestContextListener
监听,否则请求action时会报错。

热点排行