多个tiles-def xml文件

发布于 2024-12-25 05:20:00 字数 103 浏览 2 评论 0原文

我正在使用 Struts 2.2.1 和tiles 2.1.4。

想知道是否有办法拥有多个tiles-def xml 文件,因为我的tiles-def xml 文件变得非常大。

I'm using Struts 2.2.1 and tiles 2.1.4.

Wanted to know if there is a way to have multiple tiles-def xml files as my tiles-def xml file is becoming really big.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

皓月长歌 2025-01-01 05:20:00

不确定,但我相信您需要将 param 传递给 web.xml 中的 Tiles 监听器,类似

<context-param id="struts_tiles">
 <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
 <param-value>/WEB-INF/classes/file1.xml,/WEB-INF/classes/file2.xml</param-value>
</context-param>

上面的代码未经过测试:)

Not sure but i believe you need to pass param to Tiles listener in web.xml something like

<context-param id="struts_tiles">
 <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
 <param-value>/WEB-INF/classes/file1.xml,/WEB-INF/classes/file2.xml</param-value>
</context-param>

Code above is not tested :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文