sigh
This is why JSP gets a bad wrap.
JSP 2.0 has a feature called "Tag Files". They let you create JSP tags using JSP.
What you want to do is trivial.
You will need to create a file named "abc.tag", and put it in, for example, WEB-INF/tags within your WAR.
The contents are simple for this case.
<div>
<table>
<jsp:doBody/>
</table>
</div>
To use the file in your JSP:
sample.jsp:
<%@ taglib tagdir="/WEB-INF/tags" prefix="tag" %>
<tag:abc>
actual body content
</tag:abc>
That's it! Shazam. The only caveat about tag files is that you can not use JSP scriptlets within you tag file tags. But, then, you shouldn't be do that anyway -- it's not a big deal.
Look up tag files for more details (like passing parameters and such).
Tag files, JSTL and EL make JSP 2.0 one of the best markup languages around.
tag files- today.java.net/article/2003/11/13/…