Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

problem with struts application

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I am trying to retrive data from database using struts framework.For that I am using all the required things as FormBean,Action class but 1 exception is coming in my application which is as follows................

javax.servlet.jsp.JspException: No collection found

Please help me to solve this problem.
Thanks
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sapana jain:
hi,
I am trying to retrive data from database using struts framework.For that I am using all the required things as FormBean,Action class but 1 exception is coming in my application which is as follows................

javax.servlet.jsp.JspException: No collection found

Please help me to solve this problem.
Thanks



Sapana,

Should this not goto the struts forum ?

This is how I understand your problem ....
While trying to display some data on JSP you are getting a collection not found error.

Are you using struts taglib ?

To nail down the problem .. try to find the line ... which if removed from jsp resolved the error ... then post that line ... I have a feeling that (if you have logic:iterate) the collection used is coming up as null ... try initializiting it as new ArrayList or similar ... alternatively try if its not null by using logic tag or simpler still a scriptlet (to debug)...

do post the line which if removed resolves the error.

- Razi
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts is a presentation-oriented framework. Struts classes should not be coded to connect directly to a relational database. Correct usage of Struts is the application of the Model View Controller design pattern. Struts provides a skeleton (supporting classes) for the View and a Http-based Controller.

A Model application contains the code that connects to a relational database.

Read up on the Business Delegate design pattern.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic