File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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

Calvin Yan
Greenhorn

Joined: Jun 25, 2003
Posts: 19
my struts-config.xml:
<?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>
<form-beans>
<form-bean name="loginform" type="calvin.Loginform" />
</form-beans>
<action-mappings>
<action path="/Login" type="calvin.LoginAction" name="loginform" >
<forward name="success" path="/index.jsp" />
</action>
</action-mappings>
<message-resources parameter="ApplicationResource.properties" />
</struts-config>
index.jsp:
<html:form action="Login" name="loginform" type="calvin.Loginform">
UserName: <html:text property="username"/>
Password: <html assword property="password"/>
</html:form>

Exception: Cannot find ActionMappings or ActionFormBeans collection  
Can anybody tell where is the problem? Thanks a lot.


I will do the best with what God gave me!
P. Udaya Shankar
Greenhorn

Joined: Nov 18, 2003
Posts: 21
hi,
u have to append .do to ur action ie.,
Login.do & try it will work
sandy gupta
Ranch Hand

Joined: Jan 30, 2001
Posts: 228
Is the location of u'r struts-config in your web.xml and if it is is it proper? the form and the action mapping and the jsp all seem fine, YOU DO NOT NEED TO DO A .do IF YOU ARE USING A STRUTS FORM TAG.
Sahil


Adios
Anthony Hemmans
Greenhorn

Joined: Dec 01, 2003
Posts: 1
check your web.xml file and make sure that all your references to your "WEB_INF" subdir are CAPITALIZED. The application cannot read the struts-config.xml file if it referenced as '/web-inf/struts-config.xml'
Andreas Knees
Greenhorn

Joined: Nov 10, 2004
Posts: 1
Hello,

this error also occurs if you don't include some jar-files like commons-*.jar that struts need.

I think that the Exception is not useful in this context.


Good night

Andreas
lubna kausar
Ranch Hand

Joined: May 06, 2006
Posts: 51
i m getting the same error but the reason is different i m using multiple buttons and for that in Action class i m having different methods (other then execute) so it might be realted to that...
i need help on this as its not working...n yes m using 1.2.9 version of sturts.. do i need to add any additional jars for this???
kiran kanukuntla
Greenhorn

Joined: Mar 20, 2007
Posts: 1
I had the same problem. My app was working on wsad bot not on RAD.
And in web.xml file
I changed the following lines
<init-param>
<param-name>config</param-name>
<param-value>WEB-INF/struts-config.xml</param-value>
</init-param>
to
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
It worked for me

-Kiran Kanukuntla
shahbaz aamir
Greenhorn

Joined: Dec 25, 2011
Posts: 2
I also faced same error , Actually what I did is declared a property twice
<form-property name="uname" type="java.lang.String" />
<form-property name="uname" type="java.lang.String" />


I removed It and problem solved
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Cannot find ActionMappings or ActionFormBeans collection