As mentioned in my previous post about creating Struts 2 web applications in NetBeans IDE, there is a Struts 2 plugin available for the NetBeans IDE but it is still under development. You can try it out right away if you are interested; the name of the plugin is nbstruts2support.

First read the summary of its current feature list(and what is planned for the future) and have a look at some screenshots. Then follow the installation instructions and try it on your system.

Below I take you through the installation process of nbstruts2support Struts 2 plugin for NetBeans 6.1 IDE showing a few screenshots along the way.

Installing nbstruts2support plugin in NetBeans IDE

  1. Go to the nbstruts2support download page and download the two nbm files and save them in a directory.
    Download nbstruts2support Struts 2 plugin for NetBeans IDE.
  2. Start the NetBeans IDE if not already running and go to Tools -> Plugins and select the Downloaded tab. Click the Add Plugins… button and select the two plugin files(.nbm files) downloaded in the earlier step.
    Install nbstruts2support nbm plugin files in NetBeans IDE.
    Install nbstruts2support nbm plugin files in NetBeans IDE.
  3. The Plugins dialog box should show you the details about the plugin.

    Install nbstruts2support nbm plugin files in NetBeans IDE.

    Go through the wizard clicking the button Next and accepting the license agreement and ignoring any errors about invalid signature.

    Install nbstruts2support nbm plugin files in NetBeans IDE.

    Restart the NetBeans IDE when prompted.
    Install nbstruts2support nbm plugin files in NetBeans IDE.

    The Struts 2 plugin is now installed in NetBeans.

Using nbstruts2support in NetBeans IDE

  1. The plugin doesn’t allow a Struts 2 project template to be created in NetBeans, which means that we need to manually create a basic Web Application and add Struts 2 libraries to it manually. We also need to create struts configuration files(struts.xml and struts.properties) and modify the web.xml file. If we do all this manually, then what does the plugin do?

    For one thing, the plugin helps in creating template files for Struts 2 Actions, Interceptors, Results etc.
    nbstruts2support Struts 2 plugin for NetBeans IDE allows easy creation of Struts 2 Action, Interceptor etc. template files.

    Secondly, it helps in auto-completion:
    nbstruts2support Struts 2 plugin for NetBeans IDE helps in auto-completion.
    More information on auto-completion.

    It is not yet completely bug free though:
    nbstruts2support Struts 2 plugin for NetBeans IDE helps in auto-completion but is not bug free.

    It also helps in easy navigation using hyperlinks. (See all the tabs at the top of the page: Analysis, Phase I, Phase II, Phase III.)
    nbstruts2support Struts 2 plugin for NetBeans IDE helps in hyperlinking.
    [image from nbstruts2support website]

End Notes:
The current state of Struts 2 support in the NetBeans IDE is hardly satisfying. Let us wait and see how much time it takes to complete at least the basic features in nbstruts2support. It is at least slightly better than creating and developing Struts 2 applications completely manually.

The state is different if we look at other IDEs like Eclipse and IntelliJ IDEA. I will talk more about Struts 2 support for Eclipse IDE in my next post.