Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在自定义标记中包含包含jsp和jstl标记的jsp文件_Jsp_Custom Tags - Fatal编程技术网

如何在自定义标记中包含包含jsp和jstl标记的jsp文件

如何在自定义标记中包含包含jsp和jstl标记的jsp文件,jsp,custom-tags,Jsp,Custom Tags,是否可以在自定义标记类中包含包含jstl标记的.jsp文件(在我的特定情况下,使用标记文件不是一个选项)? 例如,我需要创建自定义标记来绘制一个包含page scope变量内容的表。jsp是: <table> <thead> <tr> <c:if test="${isAdmin }"> <th><fmt:message bundle="${prop}" key="ord

是否可以在自定义标记类中包含包含jstl标记的.jsp文件(在我的特定情况下,使用标记文件不是一个选项)? 例如,我需要创建自定义标记来绘制一个包含page scope变量内容的表。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>

这里有更多代码

我尝试使用
pageContext.include()
方法包含此jsp,但我在html页面上获得了所有jstl标记是的,您可以包含
pageContext.include()
将调用
RequestDispatcher.include()

调用
pageContext.include()
只需将所有jstl放入html页面,而不做任何更改