问题描述
我正在寻找一个比Apache Tiles更好更容易使用的框架(到目前为止,我已经使用了几次)。
I'm looking for a framework that is better and easier to use than Apache Tiles (which so far, I have used a couple of times).
With Tiles,似乎当我有100个动作时,我需要创建100个jsp文件并在 tiles.xml
中创建100个定义。
With Tiles, it seems that when I have 100 actions I need to creates 100 jsp files and create 100 definitions in tiles.xml
.
是否有更好的框架来管理我的模板?我想创建,例如,2个模板:
Is there a better framework to manage my templates? I want to create, for example, 2 templates:
a)菜单和内容列
b)菜单,内容列,右列banner
a) menu and column for content
b) menu, column for content, right column with banner
在两个模板中,菜单都是常量。在模板b
中,右列是常量,因此只有内容列不同。对于这个简单示例,我 不希望 定义扩展模板的每个JSP文件
(仅提供身体)。那是跛脚的imo。或许我很蹩脚,我可以在Apache Tiles中定义一个DEFAULT模板,我只是没有正确使用它。在任何情况下,所有帮助都赞赏。
In both templates the menu is constant. In template b
, the right column is constant, so only the content column is different. For this simple example I don't want to define each JSP file that extends the template a
(just to provide a body). Thats lame imo. Or maybe I`m lame and I can define a DEFAULT template in Apache Tiles and I'm just not using it right. In anycase, all help appreciated.
推荐答案
我最终使用了JSF + Facelets。我将它们与Spring MVC结合起来,就像一个魅力。
I ended up using JSF + Facelets. I`ve combined them with Spring MVC and it works like a charm.
这篇关于Apache Tiles的更好替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!