You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Swaminathan Gurumoorthy <sw...@yahoo.com> on 2003/06/11 02:11:43 UTC

Cannot retrieve mapping for action error

Hi
 
I am a newbie to struts and I ran into problems with my very first struts functionality.
 
My customer lookup jsp has a lookup form and an iframe to show the results. I am using a dynaform to harvest the searchform entries.
 
In my customerSearch.jsp, I use a <html:form> to submit the form like this
 

<html:form method="post" action="/searchCustomers" focus="custLookupNumber" target="searchresults" onsubmit ="return false;">

 

My struts-config file has these entries

    <!-- ========== Form Bean Definitions ================================== -->
    <form-beans type="org.apache.struts.action.ActionFormBean">
    
     
     <!-- Customer Lookup Form -->
     <form-bean name="CustomerLookUpDF" type="org.apache.struts.action.DynaActionForm">
   <form-property name="custLookupNumber"  type="java.lang.String" initial=""/>
   <form-property name="custLookupName"  type="java.lang.String" initial=""/>
   <form-property name="custLookupAddress" type="java.lang.String" initial=""/>
   <form-property name="custLookupCity"  type="java.lang.String" initial=""/>
   <form-property name="custLookupState"  type="java.lang.String" initial=""/> 
   <form-property name="custLookupZip"     type="java.lang.String" initial="" />
     </form-bean>
       
    </form-beans>

 

    <!-- ========== Action Mapping Definitions =============================== -->
    <action-mappings type="org.apache.struts.action.ActionMapping">


        <!-- ======================= Customer LookUp ======================== -->
        <action
            input="/callcenter/form/body/customerSearchBody.jsp" 
            attribute="CUSTOMERLOOKUP" 
            name="CustomerLookUpDF"
            path="/searchCustomers"
            type="com.mycompany.myapp.action.CustomerLookUpAction">
            <forward name="Success" path="/form/body/customerSearchResults.jsp" />            
        </action> 
  </action-mappings>
 
My action class uses a business delegate to query the database with the dyna form values and returns the collection to the customerSearchResults.jsp. This will iterate thru the collection to display the details.
 
I thought that was straight forward. But I get this error when I call the customer lookup jsp.
 
The error is 

root cause 
javax.servlet.ServletException: Cannot retrieve mapping for action /searchCustomers	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)	at org.apache.jsp.customerSearchBody_jsp._jspService(customerSearchBody_jsp.java:84)	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)	at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)	at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)	at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)	at java.lang.Thread.run(Thread.java:536)

What am I doing wrong? I checked for typos in struts-config.xml against my jsps,action class et al.

Thanks in advance. 



---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).