2.1. Create standalone Seam Web Project

The best way to get started with Seam is to organise a simple Seam Project and experiment with it by creating variations.

Thus, you should select File > New > Seam Web Project to run the New Seam Project wizard. The wizard form allows you to create runtime and server instances in order to get started creating, running, and debugging J2EE (only) applications.

Seam Web Project wizard has an option for selecting the actual Server (not just WTP runtime) that will be used for the project. This allows the wizard to identify correctly where the required datasource and driver libraries need to go.

Let's get through the wizard step-by-step. First, you should enter a name and a location directory for your new project.

New Seam Project Wizard

Figure 2.2. New Seam Project Wizard


Clicking on New... button in the Target Runtime section will bring you to another dialog. Here, you can specify a new installed Runtime environment or the other type of runtime appropriate for configuring your project. Let's create a JBoss 4.2 Runtime. For that after choosing it click on Next button.

Specifying Target Runtime

Figure 2.3. Specifying Target Runtime


All what you need here is to name runtime, type the path to its install directory or locate it by using Browse button, select a Java Runtime Environment, and select which configuration you want.

Specifying Target Runtime Configurations

Figure 2.4. Specifying Target Runtime Configurations


Clicking on Finish returns you to the previous dialog. The next step is to define an installed server that you can do by clicking on New... button in the Target Server section. In appeared Server Dialog it's possible to select a server version.

If the chosen server has already got an installed runtime, there appears a combo box with all declared runtimes under the servers view. Here, you can indicate a server runtime that you need. Use Installed Runtimes... button to see or edit which runtimes are installed. If there is no any declared runtime for chosen server, click on Next to specify it on the next preferences page.

Specifying Target Server

Figure 2.5. Specifying Target Server


Next dialog allows you to verify the information for chosen server, set login credentials to authorize an access to the server and specify a directory for deploying. Leave everything as it is and click on Next .

Specifying Server Configurations

Figure 2.6. Specifying Server Configurations


On the last wizard step you can modify your project to configure it on server.

Project Modification for Configuring on the Server

Figure 2.7. Project Modification for Configuring on the Server


After clicking on Finish button you should have the following wizard view:

Completion of Runtime and Server Configuration

Figure 2.8. Completion of Runtime and Server Configuration


The last section on this wizard step is Configurations. Here, you can select one of the pre-defined project configurations either associated with Seam 1.2 or with Seam 2.0 that is the latest release but just only a technology preview. In addition, you can create your own configuration. Choosing Default Configuration for jBoss 4.2 Runtime allows you later to specify your own set of facets for adding extra functionality to your project. For more details about facets, see next section. Besides, we suggest that you look through our AS manager guide to find out more about runtimes and servers.

Having all necessary options arranged, click on Next to pass on to the other wizard.