Dhruv
Dhruv

Reputation: 10693

paramsPrepareParamsStack interceptor in struts2?

I want to know about paramsPrepareParamsStack interceptor in struts 2?

Any documentation links or something ?

Upvotes: 1

Views: 2779

Answers (1)

Umesh Awasthi
Umesh Awasthi

Reputation: 23587

This is a stack which is exactly same as the defaultStack, except that it includes one extra interceptor before the prepare interceptor:params interceptor.

What the comment inside struts-default.xml say:

This is useful for when you wish to apply parameters directly to an object that you wish to load externally (such as a DAO or database or service layer), but can't load that object until at least the ID parameter has been loaded. By loading the parameters twice, you can retrieve the object in the prepare() method, allowing the second params interceptor to apply the values on the object.

for details refer to interceptors.

Upvotes: 5

Related Questions