Reputation: 767
Is it possible to include .jsp file which contains jstl tags in the custom tag class(using tag files isn't an option in my particular case)?
For example I need to create custom tag to draw a table with the content of page scope variable. The table.jsp is:
<table>
<thead>
<tr>
<c:if test="${isAdmin }">
<th><fmt:message bundle="${prop}" key="orders.table.selected" /></th>
</c:if>
</tr>
more code here
<table>
I tried to include this jsp using pageContext.include()
method but I get all jstl tags on the html page
Upvotes: 1
Views: 611
Reputation: 15456
Yes, you can include. pageContext.include()
will inturn call RequestDispatcher.include()
Upvotes: 0