Loading
Struts Read MessageResources

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  How you read MessageResources in Struts ?


Ans)

A class that encapsulates messages. Messages can be either global or they are specific
to a particular bean property. Each individual message is described by an ActionMessage object,
which contains a message key (to be looked up in an appropriate message resources database),
and up to four placeholder arguments used for parametric substitution in the resulting message.

data.saved=Data saved successfully

ActionMessages messages = new ActionMessages();
ActionMessage msg = new ActionMessage(“data.saved”);
messages.add(“message1?, msg);

<html:messages id=”msgId” message=”true” property=”message1?>
       <bean:write name=”msgId”/><br>
</html:messages>

In property file data.do configured as below
data.do=Please {0}

 



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Struts Read MessageResources


Struts Read MessageResources

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free