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
posted Oct 22, 2009 06:22:50
0
Previous poster is correct; your struts-config file is malformed.
subject: Cannot find ActionMappings or ActionFormBeans collection