migrating Java Server Faces 2.3 to Jakarta Faces 4.0

created onOctober 10, 2023
Work in Progress – I’m still in the transition from Java Server Faces 2.3 to Jakarta Faces 4.0 and will add here whatever I will encounter. Jakarta Faces 3.0 didn’t bring any new features or changes, but was just a renaming of the javax.faces namespace to the jakarta.faces namespace. So I did the migration straight from Java Server Faces 2.3 to Jakarta Faces 4.0. ...

Jakarta Faces performance tuning

created onMarch 29, 2023
approaches to apply right from the start prefer HTML over JSF tags. no logic in getters (can be called multiple times) – especially for the rendered attribute. avoid logic in EL expressions. avoid using h:outputText. instead, use an EL expressions. if you need to escape HTML, it’s better to use an EL function. use AJAX where possible. only process and update components that are really required to be updated. use @RequestScoped where posssible. Avoid using @SessionScoped, @ViewScoped and other long lived scopes. approaches for performance tuning cache data, which is required multiple times in the same view, in @RequestScoped beans. split your backing beans. It’s better to have a separate bean for logic and a separate bean for values which are required for multiple requests (@ViewScoped, @ViewAccessScoped…). ...