Setting Up a Web Environment


Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 21.  Servlets

Before you can develop and test servlets, you need to set up a Web development environment. You will need several pieces of software to accomplish this. The first one is a recent version of Java, which you probably already have installed on your machine. In case you don't, however, you can obtain the Java Software Development Kit (SDK) from Sun Microsystems at

You most likely have a browser installed on your machine also. You will want to make sure that you have an up-to-date browser version, so it would be a good idea to check this version against the latest release that is available on the Microsoft and Netscape Web sites. There are times when the two leading browsers behave differently, so it is also a good idea to install both of them on your machine for testing.

In addition, you need some way to compose and edit programs. All the examples in this chapter can be typed in using Notepad or vi and run from a command line.



Java-specific editors are available, and you might find that it is worth your while to learn how to use one. Forte has a version that is available for free at JBuilder and Visual Café are two commercial products that are popular with developers also.

The third piece of the servlet puzzle is the servlet container itself. If you are currently running a Web server that provides servlet support, you can skip this step. If you don't have a servlet container running already, you will need to follow the instructions in the next section to set up the Tomcat server on your machine. Tomcat contains a light version of a Web server that is complete with a servlet container.


    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon © 2008-2017.
    If you may any questions please contact us: