posted 13 years ago
Two DTOs? One for firstname, one for lastname?
That doesn't make sense to me. If you're going to get one, you're probably going to want the other.
Why make two trips?
What I would expect is that your DAO layer would return a list of Beans, with all the attributes that you need on them.
So rather than a firstnameDTO, and lastnameDTO, I would expect a StudentDTO which has firstname and lastname attributes (and email, and student id etc etc)
Suggestions on coding style/convention
- Classes should start with a capital letter. fnmDto should be FnmDto.
- fnmDto is a horrible name anyway. I presume it is "first name data transfer object"? Just for readability use "firstName" rather than "fnm"
You then iterate over that list of StudentDTOs, and display the attributes as you wish.