这是web.xml<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"><web-app>
<servlet>
  <servlet-name>action</servlet-name>
  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  <init-param>
     <param-name>application</param-name>
     <param-value>ApplicationResources</param-value>
  </init-param>
     <init-param>
        <param-name>config</param-name>
        <param-value>/WEB-INF/struts-config.xml</param-value>
     </init-param>
     <init-param>
        <param-name>debug</param-name>
        <param-value>2</param-value>
     </init-param>
     <init-param>
        <param-name>detail</param-name>
        <param-value>2</param-value>
     </init-param>
     <init-param>
        <param-name>validate</param-name>
        <param-value>true</param-value>
     </init-param>
     <load-on-startup>2</load-on-startup>
</servlet>
  <servlet-mapping>
     <servlet-name>action</servlet-name>
     <url-pattern>*.do</url-pattern>
  </servlet-mapping><!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
  
<taglib>
  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
  <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
  <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
  <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
</web-app>

解决方案 »

  1.   

    这是struts-config.xml<?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"><!--
         This is the Struts configuration file for the example application,
         using the proposed new syntax.
    -->
    <struts-config>  <form-beans>
        <form-bean name="bookForm" type="Book"/>
      </form-beans>
      <global-forwards>
        <forward name="bookCreated" path="/BookView.jsp"/>
      </global-forwards>
      <action-mappings>
        <action path="/createBook"
         type="BookAction"
         name="bookForm"
         scope="request"
         input="/CreateBook.jsp">
        </action>
      </action-mappings>
    </struts-config>
      

  2.   

    你的Book.class文件在classes文件夹下吗