No Collection Found Exception in struts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madhoriya22
    Contributor
    • Jul 2007
    • 251

    #1

    No Collection Found Exception in struts

    Hi,
    I am getting No Collection Found Exception .. while iterating through ArrayList in jsp page. What am I doing is :
    I am clicking a link
    Code:
    <html:link href="./viewAll.do">2. View All Information</a></html:link>
    and the request is suppose to go to the corresponding Action class. But control is not going to action class. I have checked all the mappings. Here is the mapping :
    Code:
     <action path="/viewAll" type="com.spi.samplestrutsapplication.detailsentry.CustomerDetailsAction"
    name="customerDetailsForm"
    input="/viewAllCustomerDetails.jsp"
    scope="request"
    validate="true">
    <forward name="success" path="/viewAllCustomerDetails.jsp"/>
    </action>
    I dont know what is the problem. Any Help ?
  • ajos
    Contributor
    • Aug 2007
    • 283

    #2
    Originally posted by madhoriya22
    Hi,
    I am getting No Collection Found Exception .. while iterating through ArrayList in jsp page. What am I doing is :
    I am clicking a link
    Code:
    <html:link href="./viewAll.do">2. View All Information</a></html:link>
    and the request is suppose to go to the corresponding Action class. But control is not going to action class. I have checked all the mappings. Here is the mapping :
    Code:
     <action path="/viewAll" type="com.spi.samplestrutsapplication.detailsentry.CustomerDetailsAction"
    name="customerDetailsForm"
    input="/viewAllCustomerDetails.jsp"
    scope="request"
    validate="true">
    <forward name="success" path="/viewAllCustomerDetails.jsp"/>
    </action>
    I dont know what is the problem. Any Help ?

    What happens when you use the normal <a href> instead of <html:link>?
    check whether the path is found or not. Have you declared the getters and setters correctly? check whether you have set the arraylist properly in a scope(request/session). Heres an article you will find helpful. Please go through it. :)

    Comment

    • madhoriya22
      Contributor
      • Jul 2007
      • 251

      #3
      Originally posted by ajos
      What happens when you use the normal <a href> instead of <html:link>?
      check whether the path is found or not. Have you declared the getters and setters correctly? check whether you have set the arraylist properly in a scope(request/session). Heres an article you will find helpful. Please go through it. :)
      http://www.netbeans.org/kb/50/tutori...ps-struts.html
      Hi,
      Thanks for ur help. I have solved the problem. Actually I was doing some validations for my submit page. Which were not required for this operation and I had set
      Code:
       validate = true
      in struts-config file mappings. Which were not allowing the control to go to Action class.

      Comment

      Working...