The goal of this assignment is to explore the use of the Struts Framework for developing M - V - C systems. Struts is an important and popular technology for J2EE systems and more sophisticated Web Container systems that rely on Java and Java Servlets. It relies on JSPs, including several custom tag libraries, and its overall architecture is very similar to the two-level Control architecture used in the previous JSP assignment.
As with that assignment, you should see the benefits of the M -V - C architecture and the clean separation of function into components with respect to reuse. You should be able to reuse most of the code from the JSP exercise but reconfigured and reconceived into a different architecture. You will see similar function being renamed and recast into an alternative set of component classes.
Since the JSP assignment extended concepts introduced in the Basic assignment, you should look for common elements among all three designs and their implementations. Thus, you should try to answer the following questions:
- What are the fundamental components and function present in all three architectures and their implementation?
- How are these components related to one another?
- What is the trace of interaction among them generated by users' actions?
With respect to Struts, itself, more immediate goals include:
- learning the Struts architecture
- understanding how to design a simple M-V-C system that uses the Struts framework and components
- setting up an IDE (i.e., Eclipse) for Struts development
- configuring a JavaServer for Struts applications
- deploying a Struts system from an IDE to a JavaServer
Clean-up Earlier Components
Your model components should not require changes for this assignment and your view and large portions of your control and view components can be reused. Use this occasion to edit and refine your code for these modules and complete any deficiencies and/or correct any errors from your earlier assignments.
Requirements
- The basic application remains the same. Your Struts AddressBook should provide a similar, if not identical, appearance as earlier implementations, and it should provide the same function.
- You can use the same database tables, but you may wish to implement another set of tables for debugging purposes so that your previous AddressBooks remains operational. (Do keep those applications working.)
- You should set-up Eclipse to support Struts applications and use it to develop your implementation.
- You should set-up your JavaServer to support Struts applications and you should deploy your application to it and test it there before deploying to the production server (wwwj).
- Deploy your application to the production server (wwwj) when it is thoroughly tested and be sure that it works in that environment.
- Modify your JSPs to use the html taglib, taking advantage of its simplified "properties-based" tags.
- Rename your JSPs by including the prefix, struts, before the name, as in strutsLogin. They should be placed in the top level of your members subdirectory.
- Define an appropriate set of formbeans for your views. Include basic data validation checks there.
- Define an appropriate set of Action classes that replace Servlets as the basic control components. Use the Struts forward mechanism for implementing navigation.
- Study and understand the various Eclipse-generated configuration files, especially the struts-config.xml file.
Documentation
Be sure to update your documentation for this project. Be sure that your Project Description describes the application and provides user instructions for using your system. (It should be 1-2 pages in length.) Similarly, you should update your System description, describing your components, the relationships among them, and key implementation details. You should also comment on steps taken to transform your JSP AddressBook into your Struts AddressBook and any problems and/or insights you encounter along the way. Also, be sure to include/update comments in your code.
Run the Application