HomeDocumentation > Developer's guide > Tutorials > Web applications > Hello World Web Application

This application is a simple Hello World application which will output Hello World!! on the browser. It needs a Dynamic Web project and a JSP associated with it.

To run this tutorial, as a minimum you will be required to have installed the following prerequisite software.

  • Sun JDK 5.0+ (J2SE 1.5)
  • Eclipse 3.3.1.1 (Eclipse Classic package of Europa distribution), which is platform specific
  • Web Tools Platform (WTP) 2.0.1
  • Data Tools Platform (DTP) 1.5.1
  • Eclipse Modeling Framework (EMF) 2.3.1
  • Graphical Editing Framework (GEF) 3.3.1

Details on installing eclipse are provided in the Development environment section. This tutorial is organized in the following sections:

The application development will take you through the following:

Creating a Dynamic Web Project using Eclipse

  1. Launch Eclipse and Switch to Java EE perspective.








  2. Right Click under project explorer and Select Dynamic Web Project as shown in the figure





  3. Name the project as HelloWorld.





  4. Keep default values for all the fields and Select Finish.





    Adding a JSP to the project

  5. Right Click on the project HelloWorld and create a new JSP as shown in the figure.





  6. Give the name as hello.jsp and Select next. Select Finish on the next screen





  7. Modify the code of hello.jsp as follows
    hello.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Hello World</title>
    </head>
    <body>
    Hello World!!
    </body>
    </html>
    

Run and Deploy

  1. Deploy the application on the server.





  2. launch the application using http://localhost:8080/HelloWorld/hello.jsp





  3. This will display HelloWorld!! on the browser window.