For general templating engines, FreeMarker is a good alternative to Velocity - it has a nice macro system, clean syntax and semantics. These are often combined with a page layout / composition framework like Apache Tiles or SiteMesh.
Velocity is a very simple view engine. Its functionality may seem a little bit limited, but thats the idea. If you need to do more complex tasks they should be performed in server side code.
There is also resin/quercus which is a 100% java implementation of PHP. I've always liked how PHP integrates with HTML, although there's not much else I like about PHP. It's popular -- seems like you could easily cop a Wordpress theme into your java app.
发布评论
评论(4)
对于通用模板引擎,FreeMarker 是 Velocity - 它有一个很好的宏系统,干净的语法和语义。这些通常与页面布局/组合框架结合使用,例如 Apache Tiles 或 SiteMesh。
For general templating engines, FreeMarker is a good alternative to Velocity - it has a nice macro system, clean syntax and semantics. These are often combined with a page layout / composition framework like Apache Tiles or SiteMesh.
Velocity 是一个非常简单的视图引擎。它的功能可能看起来有点有限,但这就是想法。如果您需要执行更复杂的任务,则应在服务器端代码中执行它们。
Velocity is a very simple view engine. Its functionality may seem a little bit limited, but thats the idea. If you need to do more complex tasks they should be performed in server side code.
您是否正在寻找 Java 的 MVC(针对 Web)?这就是 JSF。
第三方 MVC:什么是最小的 Java Web MVC 框架?
Are you looking for Java's MVC (for the web)? That's JSF.
Third-party MVC: What's the most minimal Java web MVC framework?
还有resin/quercus,它是PHP 的100% java 实现。我一直很喜欢 PHP 与 HTML 的集成,尽管 PHP 没有太多其他我喜欢的地方。它很流行——似乎你可以轻松地将 WordPress 主题复制到你的 java 应用程序中。
There is also resin/quercus which is a 100% java implementation of PHP. I've always liked how PHP integrates with HTML, although there's not much else I like about PHP. It's popular -- seems like you could easily cop a Wordpress theme into your java app.