2.2.1.1. Creating a New Struts Project

JBoss Developer Studio includes a New Struts Project Wizard that radically simplifies the process for getting started with a new Struts project. You just need to follow these steps:

  • Select File > New > Project... from the menu bar. Then, select JBoss Tools Web > Struts > Struts Project in this dialog box. Click Next:

Selecting Struts Wizard

Figure 2.60. Selecting Struts Wizard


  • On this form, provide the Project Name. You can also select where to create the project or use the default path.

    Next to Struts Environment set which Struts version to use.

Creating Struts Project

Figure 2.61. Creating Struts Project


Tip:

Don't put spaces in project names since some OS could experience problems with their processing and searching these files.

You can select the KickStart template, then the project created will include a simple Hello World type application that is ready to run.

Choosing Struts Template

Figure 2.62. Choosing Struts Template


  • Next, you register this application with the current servlet container defined for your workspace (JBoss AS, by default) in order to allow you to test your application more easily while still developing it. A new entry will be added in the servlet container configuration file to enable running the application in-place (called null deployment or link deployment). Uncheck the "Target Server" check box if for some reason you don't want to register your application at this point.

Registering The Project at Server

Figure 2.63. Registering The Project at Server


  • On the next form, you can select the TLD files to include in this project:

Selecting Tag Libraries

Figure 2.64. Selecting Tag Libraries


After the project is created, you should have the following project structure (if you used the KickStart template):

Project Structure

Figure 2.65. Project Structure


Tip:

If you want to hide the jar files from Web App Libraries in view, select the down-pointing arrow in the upper right corner, select Filters... , check the box next to Name filter patterns (matching names will be hidden), and type *.jar into the field. Then, click OK.