Hi, I am trying to Configure Tomcat 4.0 with Struts. The Error was Apache Tomcat/4.0.2 - HTTP Status 500 - Internal Server Error type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. Exception : javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463) at org.apache.jsp.login$jsp._jspService(login$jsp.java:247) ......................
Root Cause : javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:773) ...............
I have a same problem as posted by you. My JSP with Tomcat are giving me tough time. I would request if you have a solution for: "javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection" Would appriciate your reply. Regards. Anurag
Well, the google search found a thread with the exact problem i am having... but unfortunately there is no answer. I have tried to run struts on tomcat 4.1.12 and get the same exception listed above. Has anyone had this problem and then solved it? Thanks.
This problem happens when the server is not able to find mapping for the parameter you are passing as action. for ex. if your JSP has
your struts-config.xml should have mapping for action parameter i.e. "/login" something like
and you should have Action (LoginAction) and ActionForm (LoginFormBean) inside WEB-INF/classes folder. Even after doing this if you are not getting the page try to give a mapping for login page in struts-config.xml like this
and forward the request to login page from LoginAction.
in the browser call login.do instead of login.jsp ( i.e. here you are calling the Action class which forwards the request to JSP ) - Ravindran.
I had similar problem when I used Tomcat 4.1.12, Apache Struts 1.1 w/ JDK 1.4.1 -- It has been very frustrating to figure out the root cause of this error -- my problem was fixed when I changed JRE that runs Tomcat back to 1.3.1_06. [ January 28, 2003: Message edited by: Jerry Liu ]
Ok, I spent 2 days, 2days!!! searching for this problem. The thing is that this error can be caused, from what I understand by a lot of things. Anything from mistyped closing tag in .xml file, to simply screweing up on a "/" in the root. However, after 2 days all this was fixed and I was still getting this error. And finally FINALLY, not gonna go into how(long trial and error process), I found whats wrong, so for examples sake lets say your webapplication under Tomcat is called Engine and it resides in Engine directory, I added this to Tomcats main server.xml that is in /conf directory: <Context path="/Engine" docBase="Engine" debug="0" privileged="true"/> And than it worked, and I rested of course I tried taking it out and it stopped working so that was it. I have no idea why, any light that you guys can shine on this issue, would be greatly appreciated. Fedor
The main problem lies somewhere else. Please check that you have all the jar files required for struts in your web-inf/lib folder. I got this error solved when I copied the files there. In my VSS we had only those files which we were using and we were getting this error. But it seems that struts internally uses some of its own files. So its better to have ALL files in lib instead of having only the ones you are using. For version 1.1 there are 6 files in total.
I have this problem also. I use: JBoss 3.2.2, Struts 1.1 I have no problem for a number of trials, it gets fail after several times. I have tried all solutions above but useless. The solution is just restart JBoss. However, I am sorry that I don't know the reason at all.
Always remember the rule of thumb that whenever you make modifications to the .xml file, check to see if everything is o.k by opening it in the browser because you might have forgot to close the tags or complete the quotes and so on. Once you are sure this is o.k and still does not work then try suggestions that other people have recommended in this thread because there is no one definite answer for this and it is getting difficult to nail this sucker down.
Here is My problem javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection.
I Found some thing in my log.. Jul 13, 2006 6:44:32 PM org.apache.commons.digester.Digester fatalError SEVERE: Parse Fatal Error at line 10 column 10: The end-tag for element type "action" must end with a '>' delimiter. org.xml.sax.SAXParseException: The end-tag for element type "action" must end with a '>' delimiter. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
Here is My code
account.jsp <HTML> <HEAD> <TITLE> User Maintenance </TITLE> </HEAD>
From the stack trace you've shown us, the problem is clearly the fact that the Struts ActionServlet is unable to parse your struts-config.xml file. I don't see the problem from what you've posted, but here's what I'd recommend:
1-Make a copy of your struts-config.xml file 2-Since it's the <action> tag that the message refers to, remove everything between the <action> and </action> tags. 3-Restart your Application and see if you still get the error message. 4-If you don't get the error message, re-type the <action> tag and try restarting again. 5-If you do get an error message, keep removing items until you no longer get an error message. The last thing you removed is what's causing the problem. 6-Once you've identified the portion of the xml that has the problem, fix it.
If you'll click on the email icon at the top of this post (the second from the left) you can email me directly. If you'll send your struts-config.xml file as an attachment, I'll see if I can help you find the problem.