当 Apache Tiles 2.1 在必须做的时候不做任何事情时该怎么办?
读者(女孩)和读者(男孩),
我对 Apache Tiles 2.1 有一个轻微的 f%*#@problem,我使用的是:
- Struts 2.1.8.1
- Apache Tiles 2.1
- Spring 3.0.3
- Spring Security 3.0.3
我的问题是:Apache Tiles 不适用于每个 JSP,这似乎有问题
<tiles:insertAttribute name="body" />
This insert no data。当我看到生成的结果时,我可以看到:
<table id="tilecontent">
<tr>
<sec:authorize access="hasRole('USER') and !hasRole('TESTER')">
<td class="menu">
<div id="nav"><tiles:insertAttribute name="menu" ignore="false"/></div>
</td>
</sec:authorize>
<td>
<div id="targetSynthese">
<div id="ariane"><tiles:insertDefinition name="ariane" ignore="false"/></div>
<table>
<tr>
<td class="errorMessage autoHeight"><tiles:insertDefinition name="error" /></td>
</tr>
<tr>
<td><tiles:insertAttribute name="body" ignore="false"/></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
但是当我刷新页面时,页面已加载并且也已平铺。
问题来自于“菜单”图块中 sx:a 的使用,当我删除它们时,页面第一次正确加载。
是否可以与 Spring Security 进行交互?
问候, 谢谢大家。
编辑:Struts 2 JIRA https://issues.apache.org/jira/browse/WW -2950
readers (girl) and readers (boy),
I have a slighly f%*#@ probelm with Apache Tiles 2.1, I work with :
- Struts 2.1.8.1
- Apache Tiles 2.1
- Spring 3.0.3
- Spring Security 3.0.3
My problem is : Apache Tiles does not work on each JSPs, it seems to have problem with
<tiles:insertAttribute name="body" />
This insert no data. When i see the generated result i can see :
<table id="tilecontent">
<tr>
<sec:authorize access="hasRole('USER') and !hasRole('TESTER')">
<td class="menu">
<div id="nav"><tiles:insertAttribute name="menu" ignore="false"/></div>
</td>
</sec:authorize>
<td>
<div id="targetSynthese">
<div id="ariane"><tiles:insertDefinition name="ariane" ignore="false"/></div>
<table>
<tr>
<td class="errorMessage autoHeight"><tiles:insertDefinition name="error" /></td>
</tr>
<tr>
<td><tiles:insertAttribute name="body" ignore="false"/></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
But when i refresh the page is loaded and tiles too.
The problem come from usage of sx:a in the "menu" tiles, when i remove them the page loaded correctly on the first time.
Are there any interactions possible with spring security ?
Regards,
Thanks for all.
EDIT : Struts 2 JIRA https://issues.apache.org/jira/browse/WW-2950
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经解决了我的问题。它似乎是由Spring Security引入的,
我已经删除了过滤调度程序中的INCLUDE:
并将once-per-request =“false”添加到我的applicationContext
I have resolved my problem. It seems to be introduced by Spring Security
I have removed INCLUDE in filtering dispatcher :
And add once-per-request="false" to my applicationContext