This may be a very newbie question, but I did not find anything satisfying
I want to do something like this in JSP (preferably out of the box):
eg. in a file called products.jsp an imaginary implementation that explains what I want
<x:named-segment name="product"> Product: <strong>${product.name}</strong> <br/> price: ${product.price} </x:named-segment>
and then use it in different places in the same JSP, it is defined
<table> <c:forEach var="product" items="${products}"> <tr> <td><x:use-segment name="product"/></td> </tr> </c:forEach> </table>
I looked at JSP tags and JSP Fragements , but the fragment fragment is just passed from the JSP receiver to the JSP tag, and I want it in one place
The only solution is to skip the JSP tag for this small snippet (or include?)
Did I miss something very basic?
source share