Doing a conditional include with <c:if>
Imagine you have a page where users can view comments from other users. And imagine that members can also post comments, but non-member guests cannot. You want everyone to get the same page, but you want members to “see” more things on the page. You want a conditional <jsp:include > and of course, you don’t want to do it with scripting!
What members see:
What NON-members see:
JSP code
Get Head First Servlets and JSP, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.