Idiots guide to Java on the web

Posted on 2005-04-25
Last Modified: 2013-11-21
I'm trying to get started with Java on the web. I can find plenty of stuff on Java, applets, servlets and various web servers etc but nothing that tells me how it all hangs together.  e.g I've written a simple (hello world) java class, I've got sun's webserver installed, I've put my object in the right directory, when I try to execute it via the browser it tries to download it, not run it.

In short what I'm missing is a primer on the bigger picture for Java development for the web - what are the components I need to build, how do I set them up, what is a servlet etc. Can anyone point me to a good primer on the web. Everything I can find is about the Java language or one of the components. I'm familiar with programming in other languages and have a passing acquaintance with perl/CGI.

Question by:jorbagw
    LVL 3

    Accepted Solution

    In order for Java servlets to work, you have to have a container to run them in.  The easiest one I know of to use is Tomcat.  It can be downloaded from:

    I recommend getting the latest (5.5.9 as of today) version.

    The Tomcat 5.5 documentation ( is a good place to get started.

    May I also recommend a book called Head First Servlets and JSPs.  It is a bit strange in its format, but I found it quite useful.  You can get it on for less than $30.00 (

    If you want to give more detail about your hello world program (i.e. is in a servlet, applet, JSP, etc. - what have you done so far, and so forth), I would be happy to troubleshoot it with you.

    Expert Comment

    There's a great 1st Edition of a Java Server/Scriplet  book available free online at
    LVL 3

    Expert Comment

    Check out the free books on

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Article by: kevp75
    Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now