I want to have a fixed table structure on my jsp page (3row, 4column). but I want to load data for this table from DataBase with using struts 2. I know if my table structure wasn’t fixed I could have just get a List and iterate on it and add a <tr><td>data</td></tr> in every iteration, but how could I do this in this case.
also if I don’t have enough data to fill table, I want those places to be empty.
I didn’t find a good example, if you could help me or introduce me a good tutorial, it would be really appreciated.
I want to have a fixed table structure on my jsp page (3row, 4column).
Share
You need to collect the data in a
String[][]orList<List<String>>.Since I don’t do Struts2, here’s a JSTL example to get the picture how you could do it with a similar Struts2 tag: