aspose 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


Win a copy of Spring in Action this week in the Spring 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

Eshwar Prasad
Ranch Hand

Joined: Mar 21, 2008
Posts: 202
I am getting this error while accessing the first page of struts application. Below are the code available in jsp and xml

index.jsp



struts-config.xml



LookupAction



LookupForm.java



Please guide me where am i going wrong
Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385
Try adding "/" before the lookup in the form action in your JSP


SCJP 6,SCWCD 5,SCBCD 5

Failure is not an option.
Eshwar Prasad
Ranch Hand

Joined: Mar 21, 2008
Posts: 202
As suggested, i made the change, but the same error is coming



Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385
use this Doctype in Struts-config.xml

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
Eshwar Prasad
Ranch Hand

Joined: Mar 21, 2008
Posts: 202
I tried changing Doctype, but still getting same error

I am using Tomcat 5.5 Server
Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385
Did you put ypur action tag inside action mapping tag in struts-config?

Also remove name and type from the jsp Form.

I tried creating an app wihth your code and its working fine for me.

Changes i made. Removed name and type attribute from html:form(i don't find such an attribute instruts documentation)

put the action tag inside action-mappings in struts-config.xml
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Previous poster is correct; your struts-config file is malformed.
 
Consider Paul's rocket mass heater.
 
subject: Cannot find ActionMappings or ActionFormBeans collection