views:

852

answers:

1

I am interested in your tricks etc used when writing JSP/Servlet. I will start:

I somewhat recently found out how you can include the output of one JSP tag in an attribute of another tag:

<c:forEach items="${items}">
  <jsp:attribute name="var">
    <mytag:doesSomething/>
  </jsp:attribute>
  <jsp:body>
    <%-- when using jsp:attribute the body must be in this tag --%>
  </jsp:body>
</c:forEach>
+19  A: 
BalusC
This is one of the most extensive entries here on Stackoverflow. No tricks as you said, but good knowledge and common practices anyone worth their salt should know.For the alternating table rows, better is to use modern CSS syntax and colorize with tr:nth-child(even), it makes your HTML output even cleaner.
Photodeus
nice one.. ....
org.life.java