aspose file tools*
The moose likes Struts and the fly likes Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts" Watch "Struts" New topic
Author

Struts

David Thompson
Greenhorn

Joined: Oct 13, 2005
Posts: 3
Can anyone help me out with this error.

javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.index_jsp._jspService(index_jsp.java:102)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:741)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
org.apache.jsp.index_jsp._jspx_meth_html_form_0(index_jsp.java:118)
org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Struts config file is :


<?xml version="1.0"?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>
<form-beans>

<form-bean
name="UserFormBean"
type="coreservlets.UserRegistrationForm">
</form-bean>

</form-beans>


<!-- Global Forwards Configuration -->
<global-forwards>
<forward name="register1" path="/index.jsp"/>
<forward name="signup" path="/signup.jsp"/>
</global-forwards>


<action-mappings>

<action path="/register1"
type="coreservlets.UserRegistrationAction"
name="UserFormBean"
scope="session">

<forward name="welcome" path="/WEB-INF/pages/password.jsp"/>
<forward name="success" path="/WEB-INF/pages/success.jsp"/>
<forward name="failure" path="/WEB-INF/pages/failure.jsp"/>

</action>

<action path="/signup"
type="coreservlets.SignUpAction"
name="UserFormBean"
scope="session">

<forward name="welcome" path="/WEB-INF/pages/password.jsp"/>
<forward name="success" path="/index.jsp"/>
<forward name="failure" path="/WEB-INF/pages/failure.jsp"/>

</action>


</action>


</action-mappings>

<!-- Message Resources Configuration -->
<message-resources
parameter="coreservlets.ApplicationResources"/>


</struts-config>
[ October 18, 2005: Message edited by: DavidThompson ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

David, thanks for trying to comply with the namimg rule. You're close, but still have a little way to go. Please add the space between your first and last names. It may seem pedantic, but it is required.

Also, just posting a stack trace without any code or explanation isn't going to be the most effective way to ellicit a response.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

And I have to move this to the Struts forum.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
this error indicates that when processing an <html:form> tag, the struts tag can't find the collection of ActionMappings that are placed into application scope when the Struts Action servlet initializes. This leads me to wonder whether your struts ActionServlet initialized properly. Check your web.xml file and make sure it has the following entries:


Merrill
Consultant, Sima Solutions
David Thompson
Greenhorn

Joined: Oct 13, 2005
Posts: 3
Thanks for your reply.

Here is the WEB.XML
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Show us your JSP, or at least the parts of it that contain struts custom tags.

Also, check your application server log files, and see if there are any errors when the application starts up, particularly Parse errors from org.apache.commons.digester.Digester.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts
 
Similar Threads
Cannot find ActionMappings or ActionFormBeans collection with dbcp
JspException: Cannot find ActionMappings or ActionFormBeans
Cannot find ActionMappings or ActionFormBeans collection
Cannot find ActionMappings or ActionFormBeans
ERROR :: cannot find ActionMappings or ActionFormBeans