cancel
Showing results for 
Search instead for 
Did you mean: 

How to manage error messages dynamically?

Former Member
0 Kudos

Hi, I have to manage error messages shown to customer on site dynamically. As of now we are rendering from property files. In this case, we can not change messages when required with out starting server. can someone suggest any solution so that they can edit and configure from hmc or any other interface?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Siva

Below are the steps that you can follow to create a custom message implementation.

  1. You can create an item type MessageItem in items.xml as a key, value pair. This will help you create, edit and remove the error messages from HMC (without restarting the server)

  2. Write a service layer which queries the database for the key and fetches its value (which is configurable via HMC)

  3. Write a tld which takes the key from the jsp (upon which the message needs to be shown) and returns the value on jsp (via the service layer)

  4. Set the value in the PageContext (so that it could be shown on the jsp)

This way, you can simply put the message tag on the jsp which will read the message from TLD and render on the front end. As stated above, since you can create, remove, edit the message from HMC, there would be no need for the system restart.

Answers (0)