• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Struts

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67553
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And I have to move this to the Struts forum.

Mark
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic