Flux - The Smart Struts Config Generator

The Flux project
SourceForge.net Logo

Getting Started

Prepare your environment as follows:

  1. Install Flux as Eclipse plug-in by unzipping it into your Eclipse installation folder.
  2. Set up your drawing tool as described in the respective Flux UML Tool Guide.

For each Struts module of your web application you can go about as follows:

  1. Create a UML State/Activity Model describing the workflow of the module as explained in the general UML Modelling Concept and the Flux UML Tool Guide specific to your drawing tool. The UML Tool Guide also explains how you have to save or export the model to make it available to Flux.
  2. Create the initial version of the Struts module configuration by saving the template file struts-config-new_module.xml as struts-config-<your_module_name>.xml in the WEB-INF folder of your application.
  3. You may want to check and possibly adapt the Flux preferences under the Eclipse menu 'Window/Preferences/Flux'. See 'Preferences' for details about them.
  4. You may want to check and possibly adapt the Flux properties assigned to struts-config-<your_module_name>.xml in its context menu, which can be opened by selecting the file, clicking the popup menu trigger (right mouse button) and choosing 'Properties/Flux'. See 'Properties' for details about them.
  5. Generate the update of struts-config-<your_module_name>.xml from the model by selecting 'Flux/Re-generate from model' in the config's context menu. Make sure you are online to the Internet when you execute Flux or change the references to the DTDs in the XML input to Flux.
  6. Check the results of the generation (use a diff tool!) and possibly manually enrich the struts-config-<your_module_name>.xml now with attributes and elements that are not covered by the model and what is generated from it (see the edit rules for details on what you may or need to change manually).
  7. Add strux-1.0.1.jar to the classpath of your web application if the generated struts-config-<module>.xml references the de.matthias_burbach.strux.* classes (which is the case as long as you don't change the Flux preferences 'Framework dispatcher action class', 'Framework relay action class', 'Framework enter module action class' and 'Framework final state action class'. See 'Framework Concept' for details on this.

  8. Implement the actions, pages and the like as your application requires and re-iterate the modelling and generation activities described above as needed.