Tomcat Directory Tree
As we know that the tomcat container is used for web applications deployment,the various directories inside the server directory have proper purposes. The figure below illustrates the directory tree for Apache-Tomcat server :
- lib folder – This is where all the supporting jar files are placed which are needed by our project such as drivers .
- conf folder-This is where all the server configuration files are present,e.g. server.xml,tomcat-users.xml etc.This files are server configuration files and are not project specific.server.xml contains information like running port,shutdown port for the server.
- webapps folder-As the name suggests this is the place where we have to keep our project folders to be recoganised by our tomcat server.It is this folder where server searches for deployed projects.Here only the project folders are placed.Project folders again need to follow a certain directory structure for successful deployment.The project directory tree is shown as below :
1.WEB–INF folder – This folder contains folders classes ,lib.Inside classes folder all the java class files for servlets and pojos are kept.The server searches here for the class file of respective java source code.Inside lib project specific jar files such as drivers or others are kept.Inside the WEB-INF folder only lies the project configuration file web.xml which is also known as the deployment descriptor.It is the project configuration file which contains info like servlet mapping info,welcome file list,servlet and context params etc.
The html and jsp files are put in project folder parallel to WEB–INF folder.
Number of View :2792Related posts:
Tags: Tomcat server
This entry was posted on Monday, October 4th, 2010 at 4:25 am and is filed under Java. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.