How to create a Custom JSF Converter

In Jakarta Server Faces (JSF), you can use converters to convert data between its model (backend) representation and its view (UI) representation. By default, JSF provides built-in converters for common types such as Integer, Double, Date, etc. However, in some cases, you may need to create a custom converter to handle custom data types or data conversion logic specific to your application. In this tutorial, we’ll create a custom JSF converter to convert a custom object User to and from its string representation in the UI.

Read more

Categories JSF

Using Built-in Converters in JSF Applications

In Jakarta Server Faces (JSF) applications, you often need to convert data between its native format and a format suitable for display or input on the user interface. JSF provides built-in converters that can handle various data types, including dates, numbers, and more. In this tutorial, we will show how to use them.

Read more

Categories JSF

Migrating Portal applications to JSF

This article discusses about how to migrate applications written using Portal/Portlet technology to other Enterprise frameworks such as Jakarta Server Faces. We will at first discuss why Portal applications are no longer a popular choices and then we will discuss the challenges in the migration of Portal applications. The decline of Portal frameworks In a … Read more

Categories JSF

JSF Custom Tag Tutorial

In this tutorial we will show how to create JSF custom tags based on content defined in an XHTML page. Creating custom JSF tags can be done either by means of Java classes implementing the UIComponentBase interface or by means of XHTML code fragments. In this tutorial we will show the latter option. Creating a … Read more

Categories JSF

How to solve ViewExpiredException: View could not be restored

The javax.faces.application.ViewExpiredException is a common exception in JavaServer Faces (JSF) applications that occurs when the user’s view state, which is used to maintain the state of components across requests, becomes invalid or expired. This typically happens when a user submits a form or performs an action on a JSF page after the view state has expired on the server.

Read more

How to test Jakarta Faces with HTMLUnit and Arquillian

In this article we will walk through the HTMLUnit library to learn how to test Web applications. You can combine HTMLUnit with Arquillian to test Jakarta Faces applications with ease. What is HTML Unit? HTMLUnit is a Java-based testing tool that allows developers to automate testing of web applications. It simulates a web browser, allowing … Read more

Categories JSF

JSF tutorial for Java developers

Jakarta Server Faces 3 is the current specification for JSF which runs on Jakarta EE containers such as WildFly application server. In this JSF tutorial we will cover the main features of JSF which are coming from the earlier JSF releases.Please note: if you are moving to Jakarta EE 9, Jakarta Faces 3.0 has a … Read more

Categories JSF

How to create a JSF application with Eclipse

Eclipse is the most used software development environment. Lots of specific plugins are available for JBoss products, however also with the minimal Eclipse Enterprise set you can easily build Web applications which uses JSF as user interface.

Read more

Categories JSF