wood burning stoves 2.0*
The moose likes Struts and the fly likes form page cannot find ActionMappings or ActionFormbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "form page cannot find ActionMappings or ActionFormbeans" Watch "form page cannot find ActionMappings or ActionFormbeans" New topic
Author

form page cannot find ActionMappings or ActionFormbeans

Mike Jenkins
Ranch Hand

Joined: Jul 23, 2006
Posts: 57
I keep getting error message on my Tomcat 5.5 container Struts page saying:


My form page:


Here is my web.xml


My struts-config.xml


In the application folder (Tomcat 5.5\webapps\myproject\WEB-INF)
I have the following tld files -
struts-html.tld
struts-logic.tld
struts-bean.tld

I have the struts jar in the \WEB-INF\lib folder.

Please advise.
[ November 24, 2006: Message edited by: Mike Jenkins ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
<form-bean name=�loginUserForm� type=�LoginUserForm�/>


If you look closely at the quotation marks, you will see that they are not standard quotation marks as entered from the keyboard, but the type that are different for a begin quote and an end quote. Did you paste these entries from a web page or PDF File? I suspect these may be causing the struts-config.xml file not to be parsed properly and ultimately causing the error you've reported. I'd suggest you delete every quotation mark in the file and replace it with one you've actually keyed in from the keyboard.


Merrill
Consultant, Sima Solutions
Mike Jenkins
Ranch Hand

Joined: Jul 23, 2006
Posts: 57
Thanks, I changed all the quotes (and restarted Tomcat 5.5) as suggested and still get same error:


I have checked google and other search sites with this error (Cannot find ActionMappings or ActionFormBeans collection) and still cant find the solution. Please advise anything else I can try?
[ November 25, 2006: Message edited by: Mike Jenkins ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This error occurs when you try to display a JSP and the Struts ActionServlet hasn't initialized properly. Ninety-nine percent of the time the reason it hasn't initialized properly is that there is an XML parsing error in parsing the struts-config.xml file. In order to find the specific error, you need to look at the System Out log for your app server that is generated when the app server first starts up. Sometimes the log will even give you the specific line number where the error is occurring. Find that log, and post the errors here. Also post your revised struts-config.xml file. In Tomcat that log is in <tomcat Install dir>/logs/catalina-<todays date>.log. You might also look at stderr<date>.log.

One other suggestion: It is not a good idea to use the java default package in a web application because of the way ClassLoaders work within a web application. I'd suggest you put both your ActionForm class and your Action class in a package, and put the class name including the package in your struts-config.xml file.
[ November 25, 2006: Message edited by: Merrill Higginson ]
Mike Jenkins
Ranch Hand

Joined: Jul 23, 2006
Posts: 57
I appreciate all the input and time you gave me.

It now works. I did several things but not sure which one worked for me.
First I had space in my some of my calls in the web.xml -
<param-value>/WEB-INF/struts- config.xml</param-value>
and I also made sure I had the following (along with everything I had in there) in my lib folder:

commons-beanutils.jar,commons-collections.jar,commons-dbcp.jar,commons-digester.jar,commons-fileupload.jar,commons-lang.jar,commons-logging.jar,
commons-pool.jar,,commons-resources.jar,commons-validator.jar,jakarta-oro.jar


I will now put in a package name as you suggested to avoid the java default package issue.

Thanks again!
[ November 25, 2006: Message edited by: Mike Jenkins ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: form page cannot find ActionMappings or ActionFormbeans
 
Similar Threads
Cannot find ActionMappings or ActionFormBeans collection
Cannot find ActionMappings or ActionFormBeans collect
ERROR :: cannot find ActionMappings or ActionFormBeans
Cannot find ActionMappings or ActionFormBeans
JspException: Cannot find ActionMappings or ActionFormBeans