zoukankan      html  css  js  c++  java
  • struts导包

    我用的是struts-2.2.3,开始把全部的jar包都放进去了,可是一直报

    信息: Parsing configuration file [struts-plugin.xml]
    2011-6-11 8:39:56 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
    严重: Dispatcher initialization failed
    Unable to load configuration. - bean - jar:file:/C:/Users/Jacky/Workspaces/MyEclipse%208.6/.metadata/.me_tcat/webapps/struts/WEB-INF/lib/struts2-gxp-plugin-2.2.3.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)

    头痛中,后来看到有人说:这是apache的失误。按照官方文档说明,运行Struts2必须加载5个核心jar包,也就是咱们一开始拷贝的5个jar包,如果你用的是 Struts2之前的版本是没有问题的,但是如果去下载这个新版本,就会报如上错误,因为还需要加载另外两个jar包,可是官方的说明文档没有更新

    于是照此方法加入了以下几个包
    struts2-core-2.1.6.jar、
    xwork-2.1.2.jar、
    freemarker-2.3.13.jar、
    ognl-2.6.11.jar、
    commons-logging-1.0.4.jar、
    commons-fileupload-1.2.1.jar、
    commons-io-1.3.2.jar

    但试过后还是报错,具体错误不记得了。

    不气馁,再找,发现又有人给了方法,这次成了:)

    将struts-2.1.6-all.zip中apps 文件夹中struts2-blank-2.1.6.war文件解压。进入struts2-blank-2.1.6"WEB-INF"lib,只将该文件夹下的9个jar包导入到项目工程中即可。

    解压缩的方法用winRAR工具就可以。

    它说是9个jar包,我看到得是11个jar包,全弄进去OK了

    包如下:
    asm-3.1.jar

    asm-commons-3.1.jar

    asm-tree-3.1.jar

    commons-fileupload-1.2.2.jar

    commons-io-2.0.1.jar

    commons-lang-2.5.jar

    freemarker-2.3.16.jar

    javassist-3.11.0.GA.jar

    ognl-3.0.1.jar

    struts2-core-2.2.3.jar

    xwork-core-2.2.3.jar

    看来jar包加多了也不是好事呀,google不行就百度,百度不行再google,加油!

  • 相关阅读:
    Java在ACM中的应用
    acm->stl
    残缺棋盘--状压DP
    EOJ Monthly 2019.3 A
    【CF1141E】Superhero Battle
    AtCoder Grant Contest 10.F 博弈
    莫比乌斯反演总结
    P2257 YY的GCD
    BZOJ1011 莫比乌斯反演(基础题
    HDU1695 莫比乌斯反演
  • 原文地址:https://www.cnblogs.com/ly-china/p/5567988.html
Copyright © 2011-2022 走看看