Enterprise Java Logo

Develop Web Applications Using Eclipse - Manual Build

by Dr. Wenjie He

Eclipse IDE (Integrated Development Environment) is a very popular development tool for Java projects. In this class, we are going to use Eclipse as our main IDE for web application developement. We will use two versions of Eclipse - Standard and Java EE versions. At the beginning, we only use the Eclipse Standard version.

Getting Started with Eclipse

1. Eclipse Installation

2. Starting Eclipse

3. Creating A Java Project

Note: This is a regular Java project. It is not a web application project, which means that it does not contain any configuration information. We use this project to compile the servlets for our Duke2 (the servlet version of Duke).

4. Preparing for Project

5. Adding Library JAR Files

Any Java servlet needs to extend HttpServlet class, which is not a Java SE class. It is a Java EE class. So we need to import a JAR library file that contains all the classes for servlets. We can find this class C:\JavaEE\Servers\Tomcat\apache-tomcat-5.5.26\common\lib\servlet-api.jar in Tomcat.

6. Copying and Building Source Files

Note: The JavaBeans components are not web components.

7. Assembling Web Application

File structure of Duke2

8. Deploying and Running Duke2

You will see the Duke2 example in the servlet version.

Exercise

Problem:

Requirements:

==========The End==========