You are on page 1of 2

What is Tomcat?

Ans: 1) Tomcat is a Java Servlet container and web server from the Jakarta project of the Apache
software foundation.
2) A web server responds with web paes to re!uests from client browsers.
") #eb servers can provide d$namic content based on the re!uests sent b$ the user.
%) Tomcat is ver$ ood at this because it provides both Java servlet and JavaServer&aes 'JS&)
technoloies.
() Tomcat can also be used as a web server for man$ applications even if free servlet and JS&
enine is wanted.
)) *t can be used standalone or used behind traditional web servers such as Apache httpd+ with
the traditional server servin static paes and Tomcat servin d$namic servlet and JS& re!uests
What all services are provided by Tomcat?
Ans: Tomcat server provides a host of services which are not provided b$ normal web servers
like Apache #eb Server. The followin is a list of services provided b$ Tomcat:
Handling Web Requests
Thread Management
Clustering
How do you create multiple virtual hosts?
Ans: *f $ou want tomcat to accept re!uests for multiple hosts e.. www.m$hostname.com then
$ou must.
,reate -.catalina.home/0www0app1ase + -.catalina.home/0www0deplo$+ and -
.catalina.home/0conf0,atalina0www.m$hostname.com.
Add a host entr$ in the server.2ml file.
,reate the the followin file under conf0,atalina0www.m$hostname.com0344T.2ml.
Add an$ parameters specific to this hosts webapp to this conte2t file.
&ut $our war file in -.catalina.home/0www0deplo$.
#hen tomcat starts+ it finds the host entr$+ then looks for an$ conte2t files and will start
an$ apps with a conte2t.
To add more sites just repeat and rinse+ all webapps can share the same war file location and
appbase.
bin ,ontains startup0shutdown... scripts
conf
,ontains various confiuration files includin server.xml
'Tomcat5s main confiuration file) and web.xml that sets the
default values for the various web applications deplo$ed in
Tomcat.
doc ,ontains miscellaneous documents reardin Tomcat.
lib
,ontains various jar files that are used b$ Tomcat. 4n 67*8
an$ file in this director$ is appended to Tomcat5s classpath.
los This is where Tomcat places it5s lo files.
src
The servlet A&*s source files. 9on5t et e2cited+ thouh: these
are onl$ the empt$ interfaces and abstract classes that should be
implemented b$ an$ servlet container.
webapps ,ontains sample web applications.

You might also like