What are the differences between JSP and Facelets? [duplicate]

谁都会走 提交于 2019-11-30 06:40:19

As you can read from the tutorial,

The term Facelets is used to refer to the JavaServerTM Faces View Definition Framework, which is a page declaration language that was developed for use with JavaServer Faces technology. As of JavaServer Faces 2.0, Facelets is a part of JavaServer Faces specification and also the preferred presentation technology for building JavaServer Faces based applications.

Now, JSP is the standard view technology for the web. But when it comes to adopt JSF as a web framework, JSP doesn't support all the features provided in JSF 2.0. Therefore, there was a need of some standard view technology to work with JSF 2.0. So, Facelets is just that.

If you are not working with JSF at all, you don't need to employ Facelets. You can go with JSP in that case. Or there are few other template frameworks, like FreeMarker, and Velocity. Moreover, some web frameworks, defines there own mark-up, like Struts2. So if you decided to go with Struts, using Struts mark-up is the way to go.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!