Tomcat Interview Questions And Answers

Tomcat interview questions and answers on advance and basic Tomcat with example so this page for both freshers and experienced condidate. Fill the form below we will send the all interview questions on Tomcat also add your Questions if any you have to ask and for apply
in Tomcat Tutorials and Training course just send a mail on info@pcds.co.in in detail about your self.

Top Tomcat interview questions and answers for freshers and experienced

What is Tomcat ?

Answer :
Apache Tomcat(or simply Tomcat, formerly also Jakarta Tomcat) is an open source Servlet Container and is developed by the Apache Software Foundation (ASF

Questions : 1 :: Explain what is Jasper?

Jasper is a Tomcat’s JSP engine
It parses JSP files to compile them into JAVA code as servlets
At runtime, Jasper allows to automatically detect JSP file changes and recompile...View answers

Questions : 2 :: Mention what is the output of select * from tab?

It displays the default tables in the database

Questions : 3 :: Explain how you can configure Tomcat to work with IIS and NTLM?

You have to follow the standard instructions for when the isapi_redirector.dll
Configure IIS to use “integrated windows security”
Ensure that in the server.xml you have disable tomcat...View answers

Questions : 4 :: Explain when you can use . and when you can use []?

If you are running a bean property, use the .operator, and if you are executing a map value or an array index, it is preferred to use the [] operator. Although you can use these operators...View answers

Questions : 5 :: Mention what is the default port for Tomcat?

The default port for Tomcat is 8080. After initialising Tomcat on your local machine, you can verify if Tomcat is running the URL:...View answers

Questions : 6 :: Mention what are the connectors used in Tomcat?

In Tomcat, two types of connectors are used
HTTP Connectors: It has many attributes that can be changed to determine exactly how it works and access functions such as redirects and proxy...View answers

Questions : 7 :: Mention what are the Catalina's Configuration files?

Running Tomcat as a windows service provides benefits like
Automatic startup: It is crucial for environment where you may want to remotely re-start a system after maintenance
Server startup...View answers

Questions : 9 :: Explain when to use SSL with Tomcat?

You would use Tomcat to handle connection, when you are running Tomcat as a stand-alone web server.

Questions : 10 :: Explain how you can deploy a web application using WAR files?

JSPs, servlets, and their supporting files are placed in the proper subdirectories under the web apps directory in Tomcat. You can make all the files under the web apps directory into one...View answers

Questions : 11 :: Explain what is Tomcat Valve?

A tomcat valve- a new technology is introduced with Tomcat 4 which enables you to link an instance of a Java class with a specific Catalina container.

Questions : 12 :: Mention with how many valves does Tomcat configured with?

Questions : 13 :: Explain how servlet life cycles?

The life-cycle of a typical servlet running on Tomcat
Tom-cat receives a request from a client through one of its connectors
For processing, this request Tomcat maps this request to...View answers

Questions : 14 :: Explain what is the purpose of NAT protocol?

The purpose of NAT protocol is to hide private IP address from public IP address and give a certain level of security to the organization.

Questions : 15 :: Explain what does the MAC stands for?

MAC means Medium Access Control

Questions : 16 :: Explain what is Tomcat Coyote?

Tom coyote is an HTTP connector based on HTTP/ 1.1 specification which receives and transport web requests to the Tomcat engine by listening to a TCP/IP port and sent request back to the requesting...View answers

Questions : 17 :: HOWTO set the context path of a web application in Tomcat 7.0

Add a file called ROOT.xml in <catalina_home>/conf/Catalina/localhost/
This ROOT.xml will override the default settings for the root context of the tomcat installation for that engine and host...View answers

Questions : 18 :: What is recommended way for spawning threads from a servlet in Tomcat

Your safest bet is using an applicaton wide thread pool with a max amount of threads, so that the tasks will be queued whenever necessary. The ExecutorService is very helpful in this.
Upon...View answers

Questions : 19 :: Is it possible to disable jsessionid in tomcat servlet?

You can disable for just search engines using this filter, but I'd advise using it for all responses as it's worse than just search engine unfriendly. It exposes the session ID which can be used...View answers

Questions : 20 :: Does Tomcat load the same library file into memory twice if they are in two web apps?

Tomcat creates one class-loader per webapp on your server. Thus, if you have webapp1 and webapp2 that share the same library, then this library will be indeed loaded twice.
You can eventually place...View answers

Questions : 21 :: How to deploy a war file in Tomcat 7

You can access your application from: http://localhost:8080/sample
Deploying or redeploying of war files is automatic by default - after copying/overwriting the file sample.war, check your webapps...View answers

JDBC drivers register themselves in the JVM-wide singleton DriverManager which is shared by all web apps. If you have the same (as in class name) JDBC driver register twice from two different web...View answers

Questions : 23 :: How can we specify system properties in Tomcat configuration on startup?

You can specify these parameters via context or environment parameters, such as in context.xml. See the sections titled "Context Parameters" and "Environment Entries" on this...View answers

Questions : 24 :: How to run different apps on single Tomcat instance behind different ports?

I think you can configure that in you server.xml file and put 2 services :
<Service name="app1">
<Connector port="8081" protocol="org.apache.coyote.http11.Http11NioProtocol"...View answers

Questions : 25 :: How to use JNDI DataSource provided by Tomcat in Spring?

If using Spring's XML schema based configuration, setup in the Spring context like...View answers