Step 3: Create Application Directories
You are now ready to deploy your Web applications onto Tomcat. Several sample applications ship with the Tomcat binary distribution. If you don't already have an application to deploy, you can use one of the sample applications for practice. The deployment process can be complicated depending on your application.
A typical Web application consists of HTML pages, images, JSPs, Servlets, Beans, and configuration files. Tomcat requires you to package your application in a special way, but all your application's files go into a subdirectory of the webapps directory.
First, create a directory for your application, for example: webapps\foo. Next, create a subdirectory called WEB-INF and place your deployment descriptor file there. A deployment descriptor is an XML file called web.xml that contains information about your application. The file is secure because Tomcat will not serve files contained in the WEB-INF directory directly to clients. You can easily copy and modify one of the existing sample web.xml files to customize it for your application. Next, create a subdirectory under the WEB-INF folder called classes. Place any Servlets or utility classes your application may use in the classes folder. For example, if you create an application called foo, the directory hierarchy for an application called foo becomes: