Cannot find ActionMappings or ActionFormBeans collection,实在是搞不定了

05-12-18 airhork
struts的最简单的程序

老是报错Cannot find ActionMappings or ActionFormBeans collection

快一天了,实在不知道哪里错了,大家帮忙呀

我用的是jdkj2sdk1.4.2_09,eclipse3.1.0 myeclipse 4.0gae31

struts的配置文件是:

<?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-sources />
<form-beans >
<form-bean name="FirstForm" type="com.airhork.struts.form.FirstForm" />

</form-beans>

<global-exceptions />
<global-forwards />
<action-mappings >
<action
attribute="FirstForm"
input="/form/first.jsp"
name="FirstForm"
path="/first"
scope="request"
type="com.airhork.struts.action.FirstAction" >

<forward name="success" path = "/success.jsp"/>
</action>

</action-mappings>

<message-resources parameter="com.airhork.struts.ApplicationResources" />
</struts-config>
<p>

web.xml为:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<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>
<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>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<p>

firstjsp为

<%@ page language="java"%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>

<html>

<head>

<title>JSP for firstForm form</title>

</head>

<body>

<html:form action="/first.do">

length : <html:text property="length"/><html:errors property="length"/><br/>

username : <html:text property="username"/><html:errors property="username"/><br/>

<html:submit/><html:cancel/>

</html:form>

</body>

</html>

FirstAction就是转移了个页面

return mapping.findForward("success");

实在不知道怎么办了,帮忙呀

1
blueoxygen
2005-12-20 09:53
发了帖子自己看都不看

你Jsp在哪呢?

猜你喜欢