Step 2: Creating a New Project

In this step, you will create the framework for a new application. The tasks in this step are:

Workshop organizes the files and components of your application in the following way:

When starting an enterprise application, the normal process is to

  1. Create a new workspace for the application
  2. Create an enterprise application project to link all of the application's projects (web applications, EJBs, etc.)
  3. Create projects for the modules within the application
  4. Create the project contents.

Workshop uses the following project types:

Project Type Project Contents

Enterprise Application (EAR) project

- links component projects of the enterprise application for deployment and archiving

- utility and EJB projects added to the EAR project are available on the build path of other projects in the EAR

JAR files and deployment descriptors
build files and auto-generated files
Enterprise JavaBeans (EJB) project

entity beans
session beans
message-driven beans
Java source files

Dynamic Web Project

- web applications

page flows (Java, JSP)
web files (HTML, CSS, etc.)
Java source files

Web Services Project

- web services

web services files (WSDL, Java)

Utility project

- shared controls
Java source files

To Create a Dynamic Web Project and EAR Project

  1. Click File > New > Project.
  2. Expand Web, click on Dynamic Web Project, then click Next.
  3. In the New Dynamic Web Project dialog:
    1. Enter the name MyWebProject in the Project name field.
    2. Place a check in the Add Project to an EAR checkbox.
    3. Click Finish.

After you create the dynamic web project, a top level folder is created for the project and the project files are initialized. The working file set includes a default page flow consisting of two files: Controller.java in the src folder and index.jsp in the WebContent folder.

pkg

You have also created an Enterprise Application Project:

Enterprise Application projects:

Enterprise application projects appear as siblings to the other projects in a workspace but functionally, they link together projects and do not contain any of the content of your application. A single web project (which does not contain a web service) can be deployed without an enterprise application project, but more complex applications require an enterprise application project for correct deployment. Enterprise application projects are also called EAR projects because they can be used to generate an Enterprise Archive (EAR) file for remote deployment.

Related Topics

Applications and Projects

Click one of the following arrows to navigate through the tutorial:


Still need help? Post a question on the Workshop newsgroup.