Wednesday, April 13, 2016

Struts

- MVC pattern
- a filter should be added in web.xml to inform to redirect every request to struts.
- struts1 has struts-config.xml
- there are large differences between struts1 and struts2
- struts.xml contains action mappings i.e which request should be addressed by which class.
- Action class can extend ActionSource class to get validation and other features.
- Action class can implement ModelDriven to map the input parameters to a java class instance.
- Action class can also act as model.
- all the action class variables will be available in ValueStack
- by default 'execute' method of action class will be called.. this can be configured in struts xml config.

No comments:

Post a Comment