Tuesday, September 24, 2013

Java Web development concepts using Eclipse IDE::BrainBitz

Eclipse Web Tool Platform (WTP)
This tutorial describes the development of servlets and JSPs with Eclipse WTP. 

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 webcontainers, e.g. Jetty and Apache Tomcat as well as the mayor Java EE application server. This tutorial uses Apache Tomcat as a webcontainer.

2. Tomcat Installation

Apache Tomcat Tutorial for instructions how to install Apache Tomcat.
After the installation test if Tomcat in correctly installed by opening a browser to http://localhost:8080/. This should open a information page of Tomcat.
Afterwards stop Tomcat. Eclipse WTP needs to start Tomcat itself for its deployments.

3. Installation of WTP

In case you have downloaded an Eclipse version for Java development, you can update it via theEclipse Update Manager . Install all packages from the category "Web, XML, Java EE Development and OSGi Enterprise Development" except "PHP Development" and the "RAP" Tooling.
For an introduction in the Eclipse IDE please see the Eclipse IDE Tutorial .

4. WTP Configuration

4.1. Setting up runtime environments

To configure Eclipse WTP select from the menu Window → Preferences → Server → Runtime Environments. Press the Add button.
Select your version of Tomcat.
To compile the JSP into servlets you need to use the JDK. You can check your setup by clicking on theInstalled JRE button.
Press Finish and then OK. You are now ready to use Tomcat with WTP.

4.2. Server

During development you will create your server. You can manageprobably you server via the Serverview .
You can stop and start the server via the Window → Show View → Servers → Servers menu menu.

No comments:

Post a Comment