Displaying Messages and Errors

When users interact with your application, they perform tasks it defines, like saving or editing things. The Guestbook application is no different. Your application should provide feedback on these operations so users can know they completed. Up to now, you’ve been placing this information in logs that only administrators can access. Wouldn’t it be better to show users these messages?

Figure 1: You can use Liferays APIs to display helpful messages.

Figure 1: You can use Liferay's APIs to display helpful messages.

That’s exactly what you’ll do next, in three steps:

  1. Create language keys for your messages.
  2. Add the error messages to your action methods.
  3. Report those error messages in your JSPs.

If you get stuck, source code for this step is provided.

Ready to get started?

Let’s Go!

« Creating a User InterfaceCreating Language Keys »
Was this article helpful?
1 out of 1 found this helpful