wood burning stoves 2.0*
The moose likes Struts and the fly likes Cannot find ActionMappings or ActionFormBeans collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Cannot find ActionMappings or ActionFormBeans collection" Watch "Cannot find ActionMappings or ActionFormBeans collection" New topic
Author

Cannot find ActionMappings or ActionFormBeans collection

as chhipa
Greenhorn

Joined: Sep 04, 2006
Posts: 26
Hi everybody
I am getting follwing exception when open the index.jsp page


javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:495)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
...
....
-----------------------------------------------------

Tomcat version---------> jakarta-tomcat-4.1.31
Java Version ---------> j2sdk1.4.2


Follwing is index.jsp page


<%@ page language="java" %>
<%@taglib
uri="/WEB-INF/struts-html.tld"
prefix="html" %>
<html>
<body>
<html:form action="lookup">
<table width="45%" border="0">
<tr>
<td>Symbol:</td>
<td><html:text property="symbol" /></td>
</tr>
<tr>
<td colspan="2" align="center"><html:submit /></td>
</tr>
</table>
</html:form>
</body>
<html>
-------------------------------------------------------------------------

Follwing is 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>

<display-name>Tomcat Examples</display-name>
<description>
Tomcat Example servlets and JSP pages.
</description>


<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>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

</web-app>

-------------------------------------------------
Folwing is 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="lookupForm" type="ch03.LookupForm" />
</form-beans>
<action-mappings>
<action path="/lookup" type="ch03.LookupAction" name="lookupForm" >
<forward name="success" path="/quote.jsp" />
<forward name="failure" path="/index.jsp" />
</action>
</action-mappings>
</struts-config>
--------------------------------------------------------------------------
Jar Files included in the WEB-INF/lib folder
commons-fileupload-1.0.jar
struts.jar
commons-beanutils.jar
commons-collections.jar
commons-dbcp-1.1.jar
commons-digester.jar
commons-logging.jar
commons-pool-1.1.jar
commons-validator.jar
jakarta-oro.jar
antlr.jar
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Here is a handy page that I ran across recently: http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html

A quote from that page related to this error:

Another element that must be present in the web.xml file is the load-on-startup element. This can be either an empty tag or can have an integer specified that indicates the priority of executing the associated servlet. The higher the number in the load-on-startup tags, the lower its priority.

Try adding an entry like this just before your closing servlet tag:


- Brent
 
Consider Paul's rocket mass heater.
 
subject: Cannot find ActionMappings or ActionFormBeans collection