I'm preparing to move my web application which was intially written with JSF 1.x and JSP to JSF 2 (myFaces 2.1.7) and Facelets. I also reason the move to Facelets since it is default view in JSF 2.0 and also libraries such as RichFaces 4 require it.
Firstly, I am following the following document as guide to help me migrate the code:
Migrating from JSP To Facelets
In terms of complexity involved, it doesn't seem very complex based on the migration path in above link. Is the link not the whole picture?
Also in my current code there are many scriplets such as
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
The basePath
is then used in the various places in page, one for example is in JavaScript function that opens a new Page basePath + newPage.faces
and document Id retrived from hiddenInput.
With Facelets how can the above be archived?