2012-06-01 54 views
1

是否可以在自定义标记类中包含包含jstl标记的.jsp文件(使用标记文件不是我的特例中的选项) ? 例如,我需要创建自定义标签来绘制页面范围变量内容的表格。该table.jsp是:
如何在自定义标记中包含jsp和jstl标记的jsp文件

<table> 
    <thead> 
    <tr> 
     <c:if test="${isAdmin }"> 
      <th><fmt:message bundle="${prop}" key="orders.table.selected" /></th> 
     </c:if> 
    </tr> 
    more code here 
<table> 

我想包括这个JSP使用pageContext.include()方法,但我得到的html页面

回答

0

是所有JSTL标签,可以包含。 pageContext.include()将内部调用RequestDispatcher.include()

+0

调用'pageContext.include()'只是将所有jstl放入html页面而没有任何更改 – ATMTA