This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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 ]
Joined: Feb 15, 2005
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 ]
Joined: Jul 23, 2006
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 ]