Servlets require you to set your CLASSPATH , use packages to avoid name conflicts, install the class files in servlet-specific locations, and use special-purpose URLs. Not so with JSP pages. JSP pages can be placed in the same directories as normal HTML pages, images, and style sheets; they can also be accessed through URLs of the same form as those for HTML pages, images, and style sheets. Here are a few examples of default installation locations (i.e., locations that apply when you aren't using custom Web applications) and associated URLs. Where we list SomeDirectory , you can use any directory name you like, except that you are never allowed to use WEB-INF or META-INF as directory names . When using the default Web application, you also have to avoid a directory name that matches the URL prefix of any other Web application. For information on defining your own Web applications, see Section 2.11.
JSP Directories for Tomcat (Default Web Application)
JSP Directories for JRun (Default Web Application)
JSP Directories for Resin (Default Web Application)
Note that, although JSP pages themselves need no special installation directories, any Java classes called from JSP pages still need to go in the standard locations used by servlet classes (e.g., .../WEB-INF/classes/ directoryMatchingPackageName ; see Section 2.10). Note that the Java classes used by JSP pages should always be in packages; this point is discussed further in later chapters.