Struts2 与 Tiles 2.1 或 2.2

发布于 2024-08-20 06:10:52 字数 180 浏览 2 评论 0原文

似乎没有一种简单的方法可以通过现有的 struts2-tiles 插件将 Tiles 2.1 或 2.2 与 Struts2 一起使用。我需要在我的项目中使用tiles通配符功能,其中tiles.xml变得无法维护。

有没有办法用struts2设置tiles 2.1或2.2?如何?

谢谢你,

博佐

there doesn't seem to be a simple way to use Tiles 2.1 or 2.2 with Struts2 with the existing struts2-tiles plugin. I need to use the tiles wildcards functionality in my project where the tiles.xml became unmaintainable.

Is there any way at all to set up tiles 2.1 or 2.2 with struts2? How?

Thank you,

Bozo

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

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

发布评论

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

评论(2

时光暖心i 2024-08-27 06:10:52

我建议你使用strut2的Sitmesh装饰框架

I suggest you to use Sitmesh decoration framework for strut2

清风疏影 2024-08-27 06:10:52

据我所知,当前的 struts2 主要版本附带了tiles 2.0.6。自tiles 2.1以来已添加通配符支持,因此恐怕您无法在当前版本的插件中使用通配符。
如果您想使用 struts2 设置tiles 2.1+,无论如何您都必须自己调整插件或等待下一个版本。
如果您想为您的定义设置一些动态值,您可能还需要考虑使用preparer。希望这有帮助。
您可以检查此问题以获取尚未解决的tiles插件。

As far as I'm aware current struts2 major release ships with tiles 2.0.6. Wildcard support has been added since tiles 2.1 so I'm afraid you can not use wildcards with current version of plugin.
If you want to setup the tiles 2.1+ with struts2 anyway you have to tweak the plugin yourself or wait for the next release.
You also might wanna consider using a preparer in case you want to set some dynamic values to you definition. Hope this helps.
you can check this issue for tiles plugin which is unresolved yet.

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