• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts

 
David Thompson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I have to move this to the Struts forum.

Mark
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
David Thompson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

Here is the WEB.XML
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic