This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Cannot find ActionMappings or ActionFormBeans collection Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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: 191
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: 377
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: 191
As suggested, i made the change, but the same error is coming



Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 377
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: 191
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: 377
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Cannot find ActionMappings or ActionFormBeans collection
 
Similar Threads
ActionForm class
problem with the name attribute of form tag
problem with struts-config.xml
JasperException
Compiling Struts from CMD.