JSP 2.0 Macro / Snippet / HTML Fragment / Named section without tags / includes / JSPFragments?
This might be a very newbie question, but I didn't find anything satisfying

I want to do somethign like this in JSP (out of the box preferably):

e.g. 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 later on use this in various location 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've looked into **JSP tags**, and **JSP Fragements**, but there the fragment snippet is just passed from the caller JSP to the JSP tag, and I want it to be in the same location

Is the only solution is to craete a JSP tag for that specific small snippet (or include?)

Am I missing something very basic?
 


JSP 2.0 Macro / Snippet / HTML Fragment / Named section without tags / includes / JSPFragments?
===

This might be a very newbie question, but I didn't find anything satisfying

I want to do somethign like this in JSP (out of the box preferably):

e.g. 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 later on use this in various location 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've looked into **JSP tags**, and **JSP Fragements**, but there the fragment snippet is just passed from the caller JSP to the JSP tag, and I want it to be in the same location

Is the only solution is to craete a JSP tag for that specific small snippet (or include?)

Am I missing something very basic?
 

