运行时类路径中找不到 struts.jar。

解决方案 »

  1.   

    .jar 文件可以用 winrar 打开,楼主可以看一下有没有那个 .class。:)为什么会没有呢?因为 struts 的不同版本是不一样的,楼主应该使用 1.1 版本,我猜楼主用的是 1.0 版本的 struts.jar 文件。
      

  2.   

    I figuered out solution to this problem yesterday. This problem can occur because of 3 things....
    1)
    Your struts jar files are missing in the WEB-INF/lib directory
    2) 
    The message resources config i.e. of your ApplicationResources.properties is written incorrectly in the struts-config.xml.
    if your file ApplicationResources.properties is under classes folder, then struts-config.xml should contain following entry....
    <message-resources
    parameter="ApplicationResources"/>3) This is most important reason why application failed on my PC,
    I forgot to put action servlet configuration and struts tag library descriptors in WEB.XML file... here is a snippet of my WEB.XML after the problem was solved
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <taglib>
    <taglib-uri>/WEB-INF/tlds/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location>
    </taglib>
      

  3.   

    老外遇到相同的错误。有人说struts1.0不支持。