Free tutorials for Java, Eclipse and Web programming



Follow me on twitter

Servlet and JSP development with Eclipse WTP

Lars Vogel

Version 1.4

06.12.2010

Revision History
Revision 0.1 12.12.2007Lars Vogel
created
Revision 0.3 - 1.4 10.09.2008 - 06.12.2010Lars Vogel
bug fixing and improvements

Eclipse Web Tool Platform (WTP)

This tutorial describes the development of servlets and JSPs with Eclipse WTP. This tutorial is based on Eclipse 3.6 (Helios) and Tomcat 6.0 and JDK 1.6.


Table of Contents

1. Eclipse Web Tool Platform
2. Tomcat Installation
3. Installation of WTP
4. WTP Configuration
4.1. Server
5. Servlets
5.1. Project
5.2. Creating Data Access Object
5.3. Creating the Servlet
5.4. Run
6. JavaServer Pages (JSPs)
6.1. Create Project
6.2. Create the JSP
6.3. Run it
6.4. Adjust web.xml
7. JSP's and Servlets
7.1. Create Project
7.2. Create the Controller (servlet)
7.3. Create the Views (JSP)
7.4. Run it
8. Web Archive - How to create a war file from Eclipse
9. Additional Eclipse WTP resources
10. Thank you
11. Questions and Discussion
12. Links and Literature
12.1. Source Code
12.2. Web development resources
12.3. vogella Resources

1. Eclipse Web Tool Platform

Eclipse WTP provides tools for developing standard Java web applications and Java EE applications. Typical web artifacts in a Java environment are HTML pages, XML files, webservices, servlets and JSPs. Eclipse WTP simplifies the creation these web artifacts and provides runtime environments in which these artifacts can be deployed, started and debugged. In Eclipse WTP you create "Dynamic Web Projects". These projects provide the necessary functionality to run, debug and deploy Java web applications. If you are completely new to Java web development you may want to read Introduction to Java Webdevelopment .

Eclipse WTP supports all mayor webcontainer, e.g. Jetty and Apache Tomcat as well as the mayor Java EE application server. This tutorial uses Apache Tomcat as a webcontainer.