Well the project that I have discussed in the last post is made in Struts framework. This framework provides a very easy access of the values that the user provides in the UI components. The components are handled by FormBeans and ActionBeans.
for example:
make a login page having UI components as follows:
1) a text box for username
2) a text box for password
3) a login button
Now, just simply make a form bean having the setter and getter functions of all the component properties. Then make a LoginActionBean through which all the form values are accessed and are manipulated as per the requirements and then stored in the database or any other database interaction that the developer wants to have.
The entries of the beans both form and action beans are to be made in the struts-config.xml file of the configuration file of struts. This is the controller where every request comes.

No comments:
Post a Comment