I am ready to move my web application that was written in JSF 1.x and JSP to JSF 2 (myFaces 2.1.7) and Facelets. I also explain the switch to Facelets, as this is the default view in JSF 2.0, and libraries like RichFaces 4 require this.
First, I am following the following document as a guide to help me port the code:
Migrating from JSP to Facelets
In terms of complexity, this doesn't seem very complicated based on the migration path in the link above. Is the link not the whole picture?
Also in my current code there are many scripts like
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
It basePathis then used in various places on the page, for example, in the JavaScript function, which opens a new page basePath + newPage.facesand the document identifier obtained from hidden input.
With Facelets, how can I write above?
source
share