Simple Helloworld Servlet Example Program

In this tutorial we learn how to write a Simple Helloworld Servlet Example Progaram and how to run that servlet in Tomcat which is integrated with eclipse.

1. Create a dynamic project in eclipse.

        Create a dynamic web project in eclipse(click “new” ->Dynamic web project) and add below servlet class to project

2. Write the Servlet class, HelloWorldServlet

 3. configure the servlet in deployment descriptor i.e in web.xml

 4. deploy and run the servlet in server.

Right click on the project and click on “Run As” -> “Run on Server”.



See the video tutorial for above program.

Download  Source Code


Posted in servlets and tagged .

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.