• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot find ActionMappings or ActionFormBeans collection

 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try adding "/" before the lookup in the form action in your JSP
 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As suggested, i made the change, but the same error is coming



 
Siva Masilamani
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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">
 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried changing Doctype, but still getting same error

I am using Tomcat 5.5 Server
 
Siva Masilamani
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Previous poster is correct; your struts-config file is malformed.
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!