You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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. Create a dynamic web project with the name "HelloWorld". See How to create a dynamic Web Project using Eclipse

Adding a JSP to the project.

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





  2. Give the name as hello.jsp and Select Finish.





  3. 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.
  • No labels