Reputation: 13
I used to working with JSP as view technology. But with JSF-2.0, the new push is for developers to use Facelets as their templating technology. But whether this is a serious matter? Will I lose anything if i will continue to use the JSP for views in JSF? Than exactly this technology is better? Is there any fundamental differences between the work XHTML and JSP? I would be very grateful if someone could answer it! Thank you
Upvotes: 1
Views: 1364
Reputation: 22514
If you use JSF, you should really be using Facelets instead of JSP, as JSP and JSF do not match really well. The main problem is that the JSP world does not know anything about the JSF life cycle. You can read this article for some examples. Facelets does not have these problems as it was created specifically to match JSF.
Upvotes: 1
Reputation: 3671
New view scope and the inclusion of Facelets is major improvements of JSF along with support ajax and annotations. This technology is a very important and powerful property in the JSF 2.0. So I would not recommend ignore it without having a necessity.
JSP is discouraged from JSF 2.0, because Facelets provide with a much clearer and flexible mechanism for developing user interfaces than legacy JSP. Facelets are far better for several basic reasons:
In general, JSP as view technology in JSF 2.0 is considered more trouble and difficult to maintain
Upvotes: 3
Reputation: 905
There is no choice between xhtml and jsp. JSP is a server-side templating mechanism for creating text-based responses to send to the the browser. That text response could be xhtml, html, json, xml, or any other text format. So you can use jsp to create xhtml - you don't choose between them.
Just because you changed the extension doesn't mean you're doing anything different. You're just changing what you call it - there's no particular reason to do so, and it's confusing.
Upvotes: -3