| Free tutorials for Java, Eclipse and Web programming |
Version 1.0
Copyright © 2008 - 2009 Lars Vogel
02.11.2009
| Revision History | ||
|---|---|---|
| Revision 0.1 - 0.2 | 12.12.2007 | Lars Vogel / Waldemar Geppart |
| First Version | ||
| Revision 0.3 | 10.09.2008 | Lars Vogel |
| Moved Webservice part to own article | ||
| Revision 0.4 | 13.10.2008 | Lars Vogel |
| Added JSP and MVC example, added authorization chapter | ||
| Revision 0.5 | 12.04.2009 | Lars Vogel |
| Rework, removed DB example | ||
| Revision 0.6 | 18.05.2009 | Lars Vogel |
| Improved wording, general clean-up | ||
| Revision 0.7 | 02.07.2009 | Lars Vogel |
| Update to Eclipse 3.5 | ||
| Revision 0.8 | 03.07.2009 | Lars Vogel |
| Moved Servlet which creates JavaScript to http://www.vogella.de/blog/?p=395 | ||
| Revision 0.9 | 18.07.2009 | Lars Vogel |
| Minor improvements | ||
| Revision 1.0 | 02.11.2009 | Lars Vogel |
| Closing the file counter | ||
Eclipse Web Tool Platform (WTP)
This article describes the development of servlets and JSPs with Eclipse WTP.
It starts by developing servlets which keeps track of the number of visitors of a website, including a servlet which stores this data into a file.
The creation of JavaServerPages and well as the creation of a war file to run the application in a web container is also explained.
This article assume that you have already basic Eclipse knowledge. The following uses the JDK 1.6, Eclipse 3.5 (Galileo) and Tomcat 6.0 for its examples.
Table of Contents
Eclipse WTP provides tools for developing standard Java web applications and Java EE applications. Eclipse WTP simplifies the creation of web artifacts and provides a runtime environment in which these artifacts can be deployed, started and debugged. Typical web artifacts in a Java environment are HTML pages, XML files, webservices, servlets and JSPs.
The following article will focus on the creation of servlets and JSP with Eclipse WTP and how to use the runtime environment of Eclipse to test them.
Eclipse WTP supports all mayor webcontainer, e.g. Jetty and Apache Tomcat as well as the mayor Java EE application server. This tutorial will be based on Apache Tomcat.
The development of webservices with Eclipse WTP is covered in Webservices with Axis2 and the Eclipse Web Tool Platform (WTP) - Tutorial .
The development of JavaServerFaces is covered in JavaServer Faces (JSF) development with Eclipse WTP JSF - Tutorial and JSF with Apache Myfaces Trinidad and Eclipse .
Eclipse uses builders which are responsible for working with the relevant artifacts. Eclipse WTP uses "Dynamic Web Projects". These projects provide the necessary builders to run, debug and deploy a Java web application. Therefore for the development of Java web application you create "Dynamic Web Projects" .