UML to JEE : First applications with JEE module
From AcceleoWiki
Tutorial : Our first applications
Our first struts application
- 2 - Installation of the required struts files
- 2.1 - Download it at : http://acceleo.org/modules/pages/jee/input/org.acceleo.modules.pim.uml21.gen.java.struts.init.zip

- 2.2 - Import it with the Import > Archive File wizard

- 2.3 - At the end you should have more files in you project

- 2.1 - Download it at : http://acceleo.org/modules/pages/jee/input/org.acceleo.modules.pim.uml21.gen.java.struts.init.zip
- 3 - Create a new UML model
- 3.1 - Create a new 'models' folder
- 3.2 - Create a new UML model
- 3.3 - Model your application (see UML modelisation for JEE module for more information)

- 3.1 - Create a new 'models' folder
- 4 - Use the module launcher
- 4.1 - Call Acceleo Module launcher via File > New > Module launcher
- 4.2 - The module to use is JEE Struts generator
- 4.3 - Give a name to the module (It should be explicit ! You can use many chain in the same project)
- 4.4 - Select the model you just create.
- 4.5 - Finish the wizard. A new chain is created. Now you just have to call it !

- 4.1 - Call Acceleo Module launcher via File > New > Module launcher
- 5 - Exploit the generation result
- 5.1 - The module generates a struts architecture "ready to use".
- 5.2 - However, there is a compilation error in the generated sources. To solve it, we have to add a reference to the JUnit library (for the HTMLUnit). Use theRight click on the project > Build path > Add libraries .. menu.
- 5.3 - Select JUnit and finish.
- 5.4 - A little step rest to obtain a functional application : Since we can't generate the perfect JSP as everybody wishes, we use a "One Shot generation" way to create this JSP. We generate sample of JSP in a "generated" folder. You have to copy it in the "WebContentDirectory".
- 5.5 - Now the project compiles. We can launch it on a server. For that, use the Right click on the project > Run As > Run on Server menu and add your project on the server you want to deploy it.
- 5.6 - It should work !
- 5.1 - The module generates a struts architecture "ready to use".
Our first hibernate application
Hibernate init files : http://acceleo.org/modules/pages/jee/input/org.acceleo.modules.pim.uml21.gen.java.hibernate.init.zip



