I am pretty new to java dev & JSF framework and as an exercise to get me up to speed I am migrating a JSP web app to a JSF2 structure. I was wondering if someone could suggest a best practice for doing this?
Currently the JSP files are basically used to obtain information from the various libraries they sit on top of, and I was thinking that for JSF I need to essentially rip out the Java from these JSP files and place them in to a managed bean. These would then be referenced within the XHTML files.
Am I on the right lines or am I completely missing the point?
Cheers
If you have followed MVC in your jsp app, then it would be pretty easy.
Take all the form beans from jsp and make them managed bean with proper annotation and scope
take controller’s logic to action method
for navigation replace
forward()andredirect()‘s call to enabled it with JSF navigation handlerchange the view from jsp to XHTML well and do the binding with JSF EL style