Two Laptop Bag
The moose likes Struts and the fly likes Internal Server Error :Cannot find ActionMappings or ActionFormBeans collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Internal Server Error :Cannot find ActionMappings or ActionFormBeans collection" Watch "Internal Server Error :Cannot find ActionMappings or ActionFormBeans collection" New topic

Internal Server Error :Cannot find ActionMappings or ActionFormBeans collection

Ram Krishna

Joined: Mar 19, 2002
Posts: 1
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(
at org.apache.jsp.login$jsp._jspService(login$

Root Cause :
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.struts.taglib.html.FormTag.lookup(

Can any one help

Joined: Jul 29, 2002
Posts: 1
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.
Chad McGowan
Ranch Hand

Joined: May 10, 2001
Posts: 265
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?
Bharat Varma

Joined: Apr 03, 2002
Posts: 1
I am facing the same problem.Any help would be appreciated.
ravindran shanmugam

Joined: Aug 30, 2001
Posts: 15
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 instead of login.jsp
( i.e. here you are calling the Action class which forwards the request to JSP )
- Ravindran.
Jerry Liu

Joined: Jan 28, 2003
Posts: 2
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 ]
Angela Stempfel

Joined: Nov 27, 2001
Posts: 15
hi all
i have exactly the same problem. Has anybody found a solution to this problem?
Anand Shivadas

Joined: Oct 17, 2000
Posts: 22
Add the following tab in web.xml for action servlet, I had the sdame problem, now it works fine.
Fedor Smirnoff
Ranch Hand

Joined: Apr 21, 2003
Posts: 45
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.
Mukesh Shetty

Joined: Aug 09, 2003
Posts: 1
Thanks Anand Shivdas. Your nugget worked!. Could you please elaborate a little if possible as to why is it necessary to add the like in the Action Servlet.
Many Thanks

If you give peanuts, you get monkeys. Be reasonable<br />Bombay Calling!
sachin pathak

Joined: Jun 05, 2002
Posts: 27
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.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

Long due for moving to the Struts forum.

[Asking smart questions] [About Bear] [Books by Bear]
Quinn Lau

Joined: Feb 18, 2004
Posts: 1
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.
Zafar Azeem

Joined: Feb 26, 2004
Posts: 2
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.
Sunesh Kumar
Ranch Hand

Joined: Oct 17, 2005
Posts: 89
Hi Friends,

Just began the taste of Struts...

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

<TITLE> User Maintenance </TITLE>

<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>

<html:form action="/account">
<td> <bean:write name="accountBean" property="warning"> </td>
<td> Email </td>
<td> <html:text property="email" /> </td>
<td> Password </td>
<td> <html assword property="password" /> </td>
<html:radio property="operation" value="createAccount" />Create Account
<html:radio property="operation" value="modifyAccount" />Modify Account
<html:radio property="operation" value="deleteAccount" />Delete Account
<html:submit value="Perform Selected Operation" />

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"

<form-bean name="accountBean" type="com.sunesh.struts.AccountBean" />

<forward name="failure" path="/admin/faliure.jsp" />


<action path="/account"

<forward name="create-success" path="/admin/create-confirm.jsp" />
<forward name="modify-success" path="/admin/modify-confirm.jsp" />
<forward name="delete-success" path="/admin/delete-confirm.jsp" />






package com.sunesh.struts;

import org.apache.struts.action.*;

public class AccountBean extends ActionForm
private String email = "";
private String password = "test";

//Variables for operation and warning messages
private String warning = "";
private String operation = "";

public String getEmail()

public void setEmail(String email)
{ = email;

public String getPassword()
return this.password;

public void setpassword(String password)
this.password = password;

public String getWarning()
return this.warning;

public void setWarning(String warning)
this.warning = "<h2><font color=red>"+ warning + "</font></h2>";

public String getOperation()
return this.operation;

public void setOperation(String operation)
this.operation = operation;

Sorry friends for trobling you...but please help because it is eating my brain from past 3 days and I could not solve that...

And one thing more I am using my action class as "DisptachAction"...

please help me , by then I can step a head...

Bye...waiting for ur replies

Thanks & Regards<br />Sunesh Kumar Baachu
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.

Consultant, Sima Solutions
Sunesh Kumar
Ranch Hand

Joined: Oct 17, 2005
Posts: 89

I am very much Thankful to you for your response.

I have only one "action" tag in <action-mappings> and i placed like this after ur suggestion.


But still the same error in the Stack is occuring...

and also this...

javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection

What can I do my dear friend...

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.
I agree. Here's the link:
subject: Internal Server Error :Cannot find ActionMappings or ActionFormBeans collection
It's not a secret anymore!