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 also provide feedback on these operations so users can know if they worked. 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?

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.

Ready to get started?

Let’s Go!

Creating Language Keys

Displaying Messages and Errors Step 1 of 3 Any modern application should place its messages and form field labels in a language keys file that can be duplicated and then translated into multiple...

Read More

Adding Failure and Success Messages

Displaying Messages and Errors Step 2 of 3 To display correct feedback to users properly, you must edit your portlet classes to use Liferay Portal’s SessionMessages and SessionErrors classes. These...

Read More

Adding Messages to JSPs

Displaying Messages and Errors Step 3 of 3 Any messages the user should see are now stored in either SessionMessages or SessionErrors. Next, you’ll make these messages appear in your JSPs. In the...

Read More
0 (0 Votes)
Permissions in JSPs Previous