All the Java web application (servlet, JSP, JSF, web services) follows a standard structure, which enables deployment in a Java-capable web server (such as Apache Tomcat and Glassfish). A web context may contain many types of files, such as HTML, CSS, Scripts, images, JSP, servlet, utility classes, external lib aries (jar files). All these files are to be kept under a standard directory structure, as illustrated:
WebContextRoot: The directory that your application resides is called the context root (or document base directory). You should keep all your HTML files and resources visible to the web users (e.g., CSS, Scripts, images, JSPs) under the context root. You can create sub-directory, such as scripts and images, under the context root.
WebContextRoot\WEB-INF: This directory, although under the context root, is not visible to the web users. This is where you keep your application specific configuration files such as
WebContextRoot\WEB-INF\classes: This is where you keep all the Java classes such as servlets class-files
WebContextRoot\WEB-INF\lib: This is where you keep the jar files and native libraries, from external parties.
WebContextRoot\WEB-INF\src: You can keep your source files here or outside the web context. Source files are usually not distributed in production.
WEB-INF, this directory is also not visible to the web users. This is for Tomcat specific configuration option files, such as