From the course: Java EE: JavaServer Faces JSF

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Display messages

Display messages

From the course: Java EE: JavaServer Faces JSF

Start my 1-month free trial

Display messages

- [Instructor] Let's look at how to use the h:message components to display feedback on the webpage. We've seen that kind of feedback before. Like when we load the index page without supplying the required guest parameter in the URL. This is an implicitly generated h:message component. Based on a configuration new with JSF 2.2. Prior to this version, whenever an error occurs on the server's side without deliberately placing a message component on the Facelets page, neither end user nor page developer would know that anything went wrong. It was a real pain. This is not to say that the message component is useful only when bad things happen. With plan and styling and design, the message component is a great feedback tool. Let's add a message component to this page as part of the greeting. We start by re-organizing here a little bit. Let's add panelGrid so we can keep things in order, columns should be two, let's close this out, and close that down here. Now let's add our h:message…

Contents