Struts 2 is an architectural, MVC(Model View Controller) based framework. You will be able to develop a faster web application using struts 2. Struts 2 is developed under open source Apache software foundation. Follow below steps to configure plugins in NetBeans and create a web application using struts 2.
Download struts 2 plugins and install in NetBeans
Download the struts 2 plugins from the official Netbeans website. Download plugins as per your NetBeans version. In this article, I am using Netbeans 7.3 version but you can follow same steps with any version of NetBeans.
The downloaded file will be in the compressed format(.zip). Extract the zip file and open the Netbeans. In Netbeans go to “tools” menu and choose “plugins” option.
Plugins dialog box will appear and select the download tab. Click on “Add Plugins…” button.
Plugins selection option will appear, Select all files in extracted folder of struts 2.
Click to “install” button.
Installation window will come, click on “Next” button.
License window will appear, select the “I accept the terms in all of the license agreements” and click on “Install” button.
Click on “Continue” button
Click on “Finish” button to restart Netbeans.
Congratulations!!! you configure struts 2 plugins in your NetBeans.
Create struts 2 projects using Netbeans
Instead of the eclipse, In NetBeans, you can create struts 2 projects faster. Follow below steps.
In Netbeans, Go to “File” menu and click on “New Project” Option and choose “Web Application” project in “Java Web” category. Click on “Next” button.
Enter your project name “TestProject” and click on “Next” button.
Click on “Next” button
Choose “Struts 2” framework and Click on “Finish” button.
Congratulation!!! you created your first project in NetBeans. Project structure will display.