NOTE: Of late, I have been getting requests for very trivial problems that many of you are facing in your day-to-day work. This blog is not to solve your "project" problems - surely not a "Support" site.
I just love to share my knowledge in my spare time and would appreciate any questions or feedback on the articles and code I have shared. I also do appreciate thought-provoking questions that would lead me to write more articles and share.
But please do not put your day-to-day trivial problems here. Even if you do, you most probably would not get a response here.

Search This Blog


Friday, 25 November 2011

Local WebServer – Apache Tomcat

Pre-requisites: You should have Apache Tomcat installed on your machine, downloadable from  and you should have eclipse 3.6 on your machine
Configure the webserver to be used within eclipse as follows:

1.       Unzip the download into your local directory
2.       Tell Eclipse about Tomcat

First, start Eclipse and go to the Workbench as shown in the previous section. Then, click on Servers tab at bottom. R-click, New, Server, Apache, Tomcat v6.0, navigate to folder, OK. You should now see "Tomcat v6.0 Server at localhost" listed under the Servers tab at the bottom.

3. Run Tomcat.
Click on Servers tab at bottom. R-click on Tomcat v6.0, choose "Start". Open http://localhost/ in a browser: you should see an empty page showing a blank directory listing (but not a 404 error). Eclipse incorrectly fails to copy the welcome pages when it sets up Tomcat, so if you want the friendlier welcome page, go to your-eclipse-workspace\.metadata and search for "ROOT". Copy all of the files from C:\apache-tomcat-6.0.28\webapps\ROOT into the ROOT folder inside your-eclipse-workspace\.metadata\...\ROOT. 
If you fail to copy the ROOT files as mentioned above, http://localhost/ will result in an empty directory listing. It is often mistaken for an error page, but if you look closely you will see that it says "directory listing for /" and is not an error at all. However, if you copy the ROOT files, http://localhost/ will give the nice friendly "Welcome to Tomcat" page.
4.  Make empty project.
a.       File, New, Project, Web, Dynamic Web Project.
b.      Give it a name (e.g., "SampleWebServer").
c.       Accept all other defaults.

5. Make a Welcome.html and place it on the ‘WebContent’ folder of your new Dynamic Web App.
6. Now if you type http://localhost:8080/SampleWebServer/Welcome.html in your browser, you should be able to view the page. 


  1. Hi Sai,
    I am new to android and want to develop an app with augmented reality for navigation. Can u help me with that.

  2. please tell me where i can download this book about beginner's android developer

    1. I think you should start your android development with Its really very helpful for me.
      And there are no need read books. only love with development only

  3. I just read through the entire article of yours and it was quite good. This is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest post.

  4. I am very much impressed from your post.It has amazing information.I learned lot of new things which explores my knowledge in various developments.So i must appreciate your efforts on posting these information.

  5. Hi Geetha we are doing well.

    please Can you post the article on c2dm(Cloud To Device Messaging ).

  6. Geetha Great Nice. Its very User Friendly.....

  7. Hi Sai,

    Nice blog! Is there an email address I can contact you in private?

  8. Thanks for this information this was really helpful.
    Best Android Apps

  9. Hi mam,
    Pls send me customized list view example. List view contains senders and receivers message. Sender has different layout and receiver has different.
    I have created listview but when scroll down or up there is problem.

  10. Hi geeth, will you please send me any tutorial that how to create a custom launcher theme for android.

  11. i want do setalarm concept in android based on the setting alarm getting the value from edittext and that edit text value display the notification based on the setting alarm time.... am new to android plz help me...

  12. First, start Eclipse and go to the Workbench as shown in the "previous section". Not sure which is the previous section.
    I found a very similar article that is more comprehensive than this, and gives detailed information. Check it ...

  13. Hello Ma'am,
    I want to send a url from my webview to a Website where it will be converted into Pdf format.The thing is that i'am not getting how to save that pdf in my SD card

  14. can any one plz tell me how to set a static wallpaer in android......

    i m requesting to the admin ....
    plz tell me the solution ...its much needed plz plz plz

  15. I've been using Apache Tomcat for 2 years now, and I got to say that I am pleased with it.

  16. Hello Geetha,
    I have a query regarding animation in android.
    Is it possible to scale(zoom in and zoom out) multiple bitmaps in single activity??

  17. hello miss
    your blog have information of Local WebServer – Apache Tomcat
    It is very good information

  18. hello miss geeta
    this blog is very good

  19. Hi there, just wanted to say this webserver works very well for us.