Describe the components of Struts.Struts components :
1. Model Components:
- Many application’s focus is on the view. The processing required for each submitted form / request by keeping the model’s perspective in view.
- In general the focus for handling the model components is done by the creation of java beans that support the functionality requirements. The scope concept is related to the beans is used first.
- The concept of extending ActionForm class is assumed by the Struts framework for each input form.
- ActionForm is a bean that are declared in ActionMapping configurationfile.
- The struts controller servlet automatically performs the services required, before invoking the appropriate Action method.
2. View Components:
- Struts supports the interacting input forms and used for building internationalized applications.
- Some files are uploaded by using HTML forms. Most of the browsers support the uploading of files through a input tag like <input type=”file”>. This generates a file browse button. Struts handles these kind of forms in a way that is identical to building normal forms.
3. Controller Components:
- The primary function of mapping request URI to an Action class that is implemented by the servlet. This operation also included in Struts framework. So, the Controller responsibilities include:
i. Write an Action class for every request that may be received. ii. Configuring an ActionMapping, that is in the form of XML file, for every logical requests that implements. The name of the file is struts-config.xml. iii. Updating the deployment descriptor file for the application to include the necessary components. iv. Adding the struts components to the application.
|
Core classes of the Struts FrameworkCore classes of the Struts Framework - The core classes of Struts framework are: ActionServlet, ActionForm, Action, Action Mapping, ActionForward.....