1.6. Set Up Your Development Environment

The server startup script automatically sets the server’s CLASSPATH to include the standard servlet and JSP classes and the WEB-INF/classes directory (containing compiled servlets) of each Web application. But you need similar settings, or you will be unable to compile servlets in the first place. This section summarizes the configuration needed for servlet development.

Create a Development Directory

The first thing you should do is create a directory in which to place the servlets and JSP pages that you develop. This directory can be in your home directory (e.g., ∼/ServletDevel on Unix) or in a convenient general location (e.g., C:\ServletDevel on Windows). It should not, however, be in the server’s ...

Get More Servlets and JavaServer Pages™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.