How to create templates in JSTL JSP
Posted
by desau
on Stack Overflow
See other posts from Stack Overflow
or by desau
Published on 2010-06-13T05:58:49Z
Indexed on
2010/06/13
6:02 UTC
Read the original article
Hit count: 365
Say I have a JSP page with JSTL. I'm using c:forEach and looping over 5 different sets of objects, each very similar. Each loop is nearly identical.. lots of duplicated code.
I'd like to make that loop a template -- such as a JSP template, but I want to pass the JSTL object(s) in the parameters.
How can I do this?
Or a more general question -- how can I create reusable HTML templates in JSP/JSTL?
© Stack Overflow or respective owner