• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Looping problem in the display.

 
Romeo Ranjan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ALL,

I am not able to get the display that I am expecting.This is my output



What I am expecting is








I am really not able to see where I am going wrong. Any hint please.
Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Romeo,
You have a loop around <td> in your JSP. What are you expecting it to do?
 
Liangfeng Ren
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove the <tr> and </tr> outside <c:forEach></c:forEach>
 
Ngoc Sinh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I understand, you have a list of author. Each author has some value name, id, and of list of something. You want to print all information about an author in a row.

If I understand was right, so I think each author must have a different key value. I am a little confused with these code



If it is different record, you should let another variable be the key.

In addition, the looping code you used are also confused. You put a <tr> inside another <tr>, this is not a valid html code.

If I am not wrong, the html code of your table in the generated html should be like this:



Lastly, I think you should check the output HTML code, so that you can see that there are many error in the generated html code and I hope it will help you solve the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic