Struts2 documentation on prepare
interceptor says:
A typical use of this is to run some logic to load an object from the database so that when parameters are set they can be set on this object. For example, suppose you have a User object with two properties: id and name. Provided that the params interceptor is called twice (once before and once after this interceptor), you can load the User object using the id property, and then when the second params interceptor is called the parameter user.name will be set, as desired, on the actual object loaded from the database.
I am not able to understand this what changes it making to the User
object.
Can anyone explain with some code? Or give a link where it explains?