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
- 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:
- Project Location: You could choose default location as your workspace location otherwise you could choose any location
- 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.
- 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.
- Configuration: Default selected Apache Tomcat v7.0 (Please follow Configure and Run Tomcat server in eclipse if you want to configure it)
- All below are selected by default. We don’t need to anything on that.
- Click Next
- You will below window leave all value selected default and click Next
- In next window
- Context root: This is beginning root of your project to run on the server
- Content directory: Default is WebContent to keep all your client side view files
- Please check the box Generate web.xml file to generate automatically
- Click Finish. Now you will see new Dynamic Web project in eclipse window
- Download Project: DynamicWebProject