• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1234
  • Last Modified:

Idiots guide to Java on the web

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.

1 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:  http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi

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

The Tomcat 5.5 documentation (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/index.html) 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 Amazon.com for less than $30.00 (http://www.amazon.com/exec/obidos/tg/detail/-/0596005407/qid=1114458965/sr=8-1/ref=pd_csp_1/104-4459859-5565541?v=glance&s=books&n=507846).

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.
There's a great 1st Edition of a Java Server/Scriplet  book available free online at http://pdf.coreservlets.com/
Check out the free books on http://www.bruceeckel.com

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now