Pages

Sunday, April 22, 2012

Understanding Directories of Tomcat Server


A typical tomcat server will have the following directories:

/bin: Contains the start-up and shutdown scripts for both Windows and Linux. Jar files with classes required for tomcat to start are also stored here.

/conf: Contains the main configuration files for Tomcat. The two most important are server.xml and the global web.xml.

/lib: Contains the Tomcat Java Archive (jar) files, shared across all Tomcat components. All web applications deployed to Tomcat can access the libraries stored here. This includes the Servlet API and JSP API libraries.

/logs: Contains Tomcat’s log files.

/temp: Temporary file system storage.

/webapps: The directory where all web applications are deployed, and where you place your WAR file when it is ready for deployment.

/work: Tomcat’s working directory where Tomcat places all servlets that are generated from JSPs. If you want to see exactly how a particular JSP is interpreted, look in this directory.

Sunday, April 8, 2012

Understanding Folders of Websphere Application Server (WAS) Profile

A WebSphere profile determines and controls the configuration of the actual application server. Most of the WebSphere Administration activities are centered on the profile and so understanding the underlying file system within a profile is very important.

bin : Contains the scripts used to administer the application server from a command line. Most of the scripts in the <was_profile_root> call other scripts located in the <was_root> folder.

config : Contains the XML files which persist all the configurations made through the administrative console. The behavior of the application server based on the data stored inside this folder.These XML files include serverindex.xml, resources.xml, variables.xml, etc.

installableApps : Contains default WebSphere applications which can be installed depending on the type of installation options used in the WebSphere install process. This is where defaultApplication.ear will be located.

installedApps: Contains the on-disk structure of the deployed applications as installed into WAS. This is a very important folder and is used extensively in administrative support of applications.

logs : Contains the log files pertinent to WAS runtime. Most debugging of administrative and application issues are achieved through the help of the logs contained in this folder.This folder contains the log file which tracks the JACL scripts run at the background for every action on the administration console, but this log file will be generated only if it enabled in the security settings of the administrative console.

properties : Contains key properties files which contain settings which can be used to change behaviours, for example, security for the wsadmin tool.many of the properties files are stored here with '.props' extension.

temp :  Contains runtime temporary files. For example, if JSPs within applications are converted to Java classes at runtime, then the temp folder will contain these Java classes.

tranlog :  If an application contains distributed transactions then the tranlog folder will contain transactional logs which can be used for rollback.

wstemp : Used by WebSphere during the deployment of applications as a temporary staging area and also contains in-transit configurations before console changes are saved.

* The folders temp and wstemp can be deleted when ever the server is restarted, this avoids the caching issues in the deployed applications. However these folders will get created once the application server is started.
* The websphere application server will ultimately convert the WAR file into an EAR after deployment.