Create Dynamic Web Project Eclipse

This article will show you how to Create Dynamic Web Project Eclipse

Description: There are two types of Web projects: dynamic and static. Dynamic web projects can

contain dynamic Java EE resources such as servlets, JSP files, filters, and associated metadata, in addition to static resources such as images and HTML files. Static web projects only contains static resources. When you create Web projects, you can include cascading style sheets and JSP tag libraries (for dynamic Web projects), so that you can begin development with a richer set of project resources.

Dynamic Web projects are always embedded in Enterprise Application projects. The wizard that you use to create a dynamic Web project will also create an Enterprise Application (EAR) project if it does not already exist. The wizard will also update the application.xml deployment descriptor of the specified Enterprise Application project to define the Web project as a module element. If you are importing a WAR file rather than creating a dynamic Web project new, the WAR Import wizard requires that you specify a Web project, which already requires an EAR project.

To create dynamic project in eclipse please follow below steps:

  • Download eclipse from http://www.eclipse.org/downloads/ site. I have used eclipse (Version: Helios Service Release 2)for demo.
  • Open you eclipse
  • Click File –> New –> Dynamic Web Project
create_dynamic_web_project_eclipse

create dynamic web project eclipse

  • It opens New Dynamic Web Project window. Please enter you dynamic project name in Project name and leave all value selected default. Below are descriptions:
    1. Project Location: You could choose default location as your workspace location otherwise you could choose any location
    2. Target runtime: Here you will Apache Tomcat v7.0 which is selected by default because tomcat is already configured before in eclipse. Please follow this link Configure and Run Tomcat server in eclipse if you want to do so.
    3. Dynamic web module version: Version 3.0 selected default because that is latest version in demo eclipse. You could change version based on you  need from drop down.
    4. Configuration: Default selected Apache Tomcat v7.0 (Please follow Configure and Run Tomcat server in eclipse if you want to configure it)
    5. All below are selected by default. We don’t need to anything on that.
    6. Click Next

dynamic_web_project_eclipse2

  • You will below window leave all value selected default and click Next

dynamic_web_project_eclipse_3

 

  • In next window
    1. Context root: This is beginning root of your project to run on the server
    2. Content directory: Default is WebContent to keep all your client side view files
    3. Please check the box Generate web.xml file to generate automatically

dynamic_web_project_eclipse_4

  • Click Finish. Now you will see new Dynamic Web project in eclipse window

dynamic_web_project_eclipse_5

 

Leave a Reply

Your email address will not be published. Required fields are marked *