专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Java Exception

关于javax.servlet.ServletException:Cannot find ActionMappings or ActionFormBeans collection,问struts 的一

发布时间:2010-06-05 12:34:06 文章来源:www.iduyao.cn 采编人员:星星草

报错:
  javax.servlet.ServletException:Cannot find ActionMappings or ActionFormBeans collection
  我排除了几种可能,最后认为是struts-config.xml文件的ActionMapping,form-bean的问题但是找不出来,请大家帮忙!
  1.目录为:
  |--jsp---login.jsp
  Task---|
  | |-- classes-- action--Login.class
  |--WEB-INF--|-- config-- struts-config.xml
    |-- lib-- …………
    |-- web.xml
    |-- ………… *.tld
  2.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">
 
  <struts-config>
  <form-beans>
  <form-bean name="loginForm" type="form.LoginForm"/>
  </form-beans>
  <action-mappings>
  <action path="/loginForm1"
  type="action.Login"
  name="loginForm"
  scope="session"
  validate="true"
  input="/jsp/login.jsp" >
 
  </action>
  </action-mappings>
 
  </struts-config>
  3.web.xml文件:
  <?xml version="1.0" encoding="ISO-8859-1"?>
 
  <!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd">
 
  <web-app>
  <servlet>
  <servlet-name>action</servlet-name>
  <servlet-class>org.apache.struts.ActionServlet</servlet-class>
  <init-param>
  <param-name>config</param-name>
  <param-value>/WEB-INF/config/struts-config.xml</param-value>
  </init-param>
  <init-param>
  <param-name>debug</param-name>
  <param-value>2</param-value>
  </init-param>
  </servlet>
 
  <servlet-mapping>
  <servlet-name>action</servlet-name>
  <url-pattern>*.do</url-pattern>
  </servlet-mapping>
      

友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: