Im trying to display a list that I populate from the database on my jsp.Im relatively new to programming and so am faced with an issue.
Currently I use a list of beans that stores the values obtained through a select query, each of the beans represents a row in the table. Im trying to use a c:foreach loop to display the values that i have stored in the bean .
This is the loop i use on the jsp.
The corresponding DAO code fragment
Could anyone kindly help with where Im going wrong?
So you never explained what is going wrong. I assume that you intend to display the code, description, and statusActive in a table. Are you receiving any errors? Is the rest of the page loading? Have you verified that the getDomList() is returning a valid List with actual DomainBeans inside? Why is your property method (getDomList) declaring that it throws an exception? What is the code for your DomainBean? Are the getter methods properly matched with your EL expression? I.E. do you have a getCode(), getDescription(), and getStatusActive() methods (remember that capitalization is important). Looking at your code, it looks like you are also missing the opening and closing tags for the <table> element.
thanks for replying Mike!
Earlier I really dont know what I was doing wrong but the c:foreach wouldn't even show up in my source html.I guess I wasnt setting a bean variabel of domList earlier , however after that change it does work!
Thanks for replying
Learning and Learning!-- Java all the way!
Yeah, but is it art? What do you think tiny ad?
Devious Experiments for a Truly Passive Greenhouse!