我正在使用DisplayTag库构建一个表。我需要在许多页面中的多个表中共享一列,因此我尝试使用<display:column>在<display:table>中插入<tiles:insertAttribute>
<display:table ....>
<tiles:insertAttribute name="attivoTh"/>
</display:table>
<definition name="attivoTh" template="/WEB-INF/template/default/th/attivoTh.jsp" />这是我得到的错误:
nov 21, 2016 2:08:08 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [ds] in context with path [/Jeans2016] threw
exception [Request processing failed; nested exception
is org.apache.tiles.impl.CannotRenderException: ServletException including
path '/WEB-INF/template/default/template1.jsp'.] with root cause
Exception: [.ColumnTag] Tag "column" should ne nested in "table"有人明白为什么吗?
发布于 2017-08-23 16:26:56
显示表使用集合。在那个集合里你放了一些东西。如果许多不同的表使用相同的值/对象,则在集合服务器端提供该对象。(你可以用一个包装器)
在提供的对象Foo中,那么
<display:table ....>
<display:column property="foo.value" .../>
</display:table> 或者,显示这些表的所有servlet都可以从将对象/值放在请求中并添加包含该数据的列的基本servlet中进行扩展:
<display:table ....>
<display:column ...>
${foo.value}
</display:column>
</display:table> https://stackoverflow.com/questions/40721184
复制相似问题