on 03-04-2015 7:00 AM
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?
Hi Siva
Below are the steps that you can follow to create a custom message implementation.
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)
Write a service layer which queries the database for the key and fetches its value (which is configurable via HMC)
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)
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.