Creating Struts2 project with Maven


1. Right Click  ->  New -> Maven Project
2. Click Next Button
3. Choose ArtifactId as you wish
To create wa webapp we choose maven-archetype-webapp
Click Next Button
4. Provide the GroupId and ArtifactId
GroupId – is package Name
ArtifactId – is project Name
Click Finish Button
5. Open the project just created  -> open pom.xml
6. Add all ther required dependencies and save the file
7. Refer to sample provided in the folder
8. Adding source folder into the project to manage java classes
Right Click  on project folder->  New -> source folder
Provide folder name | Click Finish
9. Similarly create another source folder for tests
10. Creating a Action Class in java source folder
11. Right click on java folder -> New -> class
12. Provide class name and package name click -> Finish
13. Similarly create Model class   in com.pkg.model package
14. Create a struts.xml file in to resource folder
15. Add fiter into your web.xml and set welcome file
16. Run your project and you will see your form
17. Create  StudentDaoInterface, StudentDaoImp, StudentResultSetExtractor
18. Create application content if alread y then update it
19. Create a service

No comments: