我是看了网上一位仁兄的视频配置完全按照他的做法做的就是在最后的时候出现这个问题,当然我的TOMCAT运行的时候也出现问题

解决方案 »

  1.   

    你struts-config.xml写的有问题。
      

  2.   

    struts-config.xml中的<form-beans>有问题!检查一下吧
      

  3.   

    你的struts-config.xml中ActionFormBean映射问题!
      

  4.   

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
        
        <!-- ========== Data Source Configuration =============================== -->
        <data-sources />
        
        <!-- ========== Form Bean Definitions ================================== -->
        <form-beans>
            <form-bean name="inForm" type="com.test.struts.form.InForm" />
            <form-bean name="inputForm" type="com.test.struts.form.InputForm">
                <form-property name="name" type="java.lang.String" />
            </form-bean>
        </form-beans>
        
        <!-- ========== Global Exception Definitions ============================== -->
        <global-exceptions />
        
        <!-- ========== Global Forward Definitions =============================== -->
        <global-forwards />
        
        <!-- ========== Action Mapping Definitions =============================== -->
        <action-mappings>
            <action
                attribute="inForm"
                input="/form/in.jsp"
                name="inForm"
                path="/in"
                type="com.test.struts.action.InAction" />
            <action
                attribute="inputForm"
                input="/form/input.jsp"
                name="inputForm"
                path="/input"
                type="com.test.struts.action.InputAction">
                <forward name="" path="" />
            </action>
        </action-mappings>
        
        <!-- ========== Controller Configuration ================================ -->
        <controller />
        
        <!-- ========== Message Resources Definitions ============================ -->
        <message-resources parameter="com.test.struts.ApplicationResources" />
        
        <!-- ========== Plug Ins Configuration ================================= -->
    </struts-config>上面的struts-config.xml是自动生成的,那位视频教学的仁兄也好象没有讲到要改啊
      

  5.   

    ebappClassLoader: validateJarFile(E:\eclipse\workspace\hello\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class我的TOMCAT启动的时候有这个错误信息啊