This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Explain What Is Tomcat Valve? |
|
Answer» 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. 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. |
|
| 2. |
Mention With How Many Valves Does Tomcat Configured With? |
|
Answer» Four types of valves Tomcat is CONFIGURED with: Four types of valves Tomcat is configured with: |
|
| 3. |
Explain When To Use Ssl With Tomcat? |
|
Answer» You WOULD use TOMCAT to HANDLE connection, when you are RUNNING Tomcat as a stand-alone web server. You would use Tomcat to handle connection, when you are running Tomcat as a stand-alone web server. |
|
| 4. |
Explain What Does The Mac Stands For? |
|
Answer» MAC MEANS MEDIUM ACCESS CONTROL MAC means Medium Access Control |
|
| 5. |
What Is Different Between Webserver And Application Server? |
|
Answer» The basic difference between a WEB server and an application server is Webserver can execute only web applications i,E servlets and JSPs and has only a single CONTAINER known as Web container which is used to interpret/execute web applications. Application server can execute ENTERPRISE application, i,e (servlets, jsps, and EJBs) it is having two containers:
it can perform operations like load balancing , transaction demarcation etc. The basic difference between a web server and an application server is Webserver can execute only web applications i,e servlets and JSPs and has only a single container known as Web container which is used to interpret/execute web applications. Application server can execute Enterprise application, i,e (servlets, jsps, and EJBs) it is having two containers: it can perform operations like load balancing , transaction demarcation etc. |
|
| 6. |
Mention What Are The Connectors Used In Tomcat? |
|
Answer» In Tomcat, two types of connectors are used:
In Tomcat, two types of connectors are used: |
|
| 7. |
How To Communicate Between Two Web Servers In Two Diff Systems? |
|
Answer» By using plug module . |
|
| 8. |
Explain What Is Tomcat Coyote? |
|
Answer» 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 CLIENT. 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 client. |
|
| 9. |
What Is Webservers? Why It Is Used? |
|
Answer» TRANSACTION with HTTP REQUEST and HTTP response is called webserver. USING the internet listening the HTTP request and providing the HTTP response is also called webserver.It gives only html output.It will not process business logic .They can provide Http server.They are static. Transaction with HTTP request and HTTP response is called webserver. Using the internet listening the HTTP request and providing the HTTP response is also called webserver.It gives only html output.It will not process business logic .They can provide Http server.They are static. |
|
| 10. |
Explain When You Can Use . And When You Can Use []? |
|
Answer» 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 interchangeably. 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 interchangeably. |
|
| 11. |
How Web Server Handles Multiple Requests For Same Action Class(struts) Concurrently? |
|
Answer» Struts or any WEBSERVER makes NEW thread for each new request. so MULTIPLE request is SERVED with new request object. Struts or any webserver makes new thread for each new request. so multiple request is served with new request object. |
|
| 12. |
Explain How Servlet Life Cycles? |
|
Answer» The life-cycle of a typical servlet running on TOMCAT:
The life-cycle of a typical servlet running on Tomcat: |
|
| 13. |
Can I Set Java System Properties Differently For Each Webapp? |
|
Answer» No. If you can edit Tomcat's startup scripts, you can ADD "-D" OPTIONS to Java. But there is no WAY to add such properties in web.xml or the webapp's CONTEXT. No. If you can edit Tomcat's startup scripts, you can add "-D" options to Java. But there is no way to add such properties in web.xml or the webapp's context. |
|
| 14. |
Mention What Is The Output Of Select * From Tab? |
|
Answer» It DISPLAYS the DEFAULT TABLES in the DATABASE It displays the default tables in the database |
|
| 15. |
Explain The Concepts Of Tomcat Servlet Container.? |
Answer»
|
|
| 16. |
Suppose When We Are Starting Startup.bat File Of Tomcat Server It Is Not Started. Dos Window Appears For A Second Only. What We Need Do? |
|
Answer» Your set up MIGHT have been not DONE WELL. Make SURE you have added tomcat root directory path in the CATALINA_HOME environment variable and added the bin path in the path variable. Your set up might have been not done well. Make sure you have added tomcat root directory path in the CATALINA_HOME environment variable and added the bin path in the path variable. |
|
| 17. |
Explain How Running Tomcat As A Windows Service Provides Benefits? |
|
Answer» Running Tomcat as a windows service PROVIDES BENEFITS like:
Running Tomcat as a windows service provides benefits like: |
|
| 18. |
How Do You Create Multiple Virtual Hosts? |
|
Answer» If you want tomcat to ACCEPT requests for different hosts e.g. www.myhostname.com then you MUST
If you want tomcat to accept requests for different hosts e.g. www.myhostname.com then you must |
|
| 19. |
Explain What Is Jasper? |
| Answer» | |
| 20. |
What Is Tomcat? |
|
Answer» Tomcat is a JAVA Servlet container and WEB server from Jakarta project of Apache software foundation. A web server sends web pages as RESPONSE to the requests sent by the browser CLIENT. In addition to the STATIC web pages, dynamic web pages are also sent to the web browsers by the web server. Tomcat is sophisticated in this respect, as it provides both Servlet and JSP technologies. Tomcat provides a good choice as a web server for many web applications and also a free Servlet and JSP engine. Tomcat can be used standalone as well as behind other web servers such as Apache httpd. Tomcat is a Java Servlet container and web server from Jakarta project of Apache software foundation. A web server sends web pages as response to the requests sent by the browser client. In addition to the static web pages, dynamic web pages are also sent to the web browsers by the web server. Tomcat is sophisticated in this respect, as it provides both Servlet and JSP technologies. Tomcat provides a good choice as a web server for many web applications and also a free Servlet and JSP engine. Tomcat can be used standalone as well as behind other web servers such as Apache httpd. |
|
| 21. |
Explain Directory Structure Of Tomcat? |
|
Answer» Directory structure of Tomcat are: bin - contain startup, shutdown, and other SCRIPTS (*.sh for UNIX and *.BAT for Windows SYSTEMS) and some jar files also there. conf - Server configuration files (including server.xml) and related DTDs. The most important file in here is server.xml. It is the main configuration file for the container. lib - contains JARs those are USED by container and Servlet and JSP application programming interfaces (APIs). logs - Log and output files. webapps – deployed web applications reside in it . work - Temporary WORKING directories for web applications and mostly used during in JSP compilation where JSP is converted to a Java servlet. temp - Directory used by the JVM for temporary files . Directory structure of Tomcat are: bin - contain startup, shutdown, and other scripts (*.sh for UNIX and *.bat for Windows systems) and some jar files also there. conf - Server configuration files (including server.xml) and related DTDs. The most important file in here is server.xml. It is the main configuration file for the container. lib - contains JARs those are used by container and Servlet and JSP application programming interfaces (APIs). logs - Log and output files. webapps – deployed web applications reside in it . work - Temporary working directories for web applications and mostly used during in JSP compilation where JSP is converted to a Java servlet. temp - Directory used by the JVM for temporary files . |
|
| 22. |
What Is Default Session Time Out In Tomcat? |
|
Answer» The DEFAULT session timeout 30 minutes in TOMCAT and can change in $TOMCAT_HOME/conf/web.xml via modify below ENTRY <session-config> <session-timeout>30</session-timeout> </session-config> The default session timeout 30 minutes in tomcat and can change in $TOMCAT_HOME/conf/web.xml via modify below entry <session-config> <session-timeout>30</session-timeout> </session-config> |
|
| 23. |
How To We Can Change Tomcat Default Port? |
|
Answer» 8080 is the DEFAULT HTTP port that Tomcat attempts to bind to at startup. To change this, we need to change port in $ TOMCAT_HOME /conf/server.xml, in that we can search 8080 and after getting below STATEMENT <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> We can change 8080 to other port LIKE 8081, we need to restart tomcat to take effect. We required changes in URL as http://localhost:8081/. 8080 is the default HTTP port that Tomcat attempts to bind to at startup. To change this, we need to change port in $ TOMCAT_HOME /conf/server.xml, in that we can search 8080 and after getting below statement <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> We can change 8080 to other port like 8081, we need to restart tomcat to take effect. We required changes in URL as http://localhost:8081/. |
|
| 24. |
How Do I Can Change The Default Home Page Loaded By Tomcat? |
|
Answer» We can EASILY override home page via adding welcome-file-list in application $TOMCAT_HOME/webapps//WEB-INF /web.xml file or by editing in container $TOMCAT_HOME/conf/web.xml In $TOMCAT_HOME/conf/web.xml, it may look like this: index.html index.htm index.jsp Request URI REFERS to a directory, the default servlet looks for a "welcome file" within that directory in FOLLOWING order: index.html, index.htm and index.jsp If none of these FILES are found, server renders 404 ERROR. We can easily override home page via adding welcome-file-list in application $TOMCAT_HOME/webapps//WEB-INF /web.xml file or by editing in container $TOMCAT_HOME/conf/web.xml In $TOMCAT_HOME/conf/web.xml, it may look like this: index.html index.htm index.jsp Request URI refers to a directory, the default servlet looks for a "welcome file" within that directory in following order: index.html, index.htm and index.jsp If none of these files are found, server renders 404 error. |
|
| 25. |
What Is Apache Tomcat? |
|
Answer» Apache Tomcat is an open-source web server and Servlet/JSP container developed by the Apache SOFTWARE Foundation. Tomcat IMPLEMENTS several Java EE specifications including Java Servlet, Java Server Pages (JSP), Java EL, and WEBSOCKET, and provides a "pure Java" HTTP web server ENVIRONMENT for Java CODE to run in. Apache Tomcat is an open-source web server and Servlet/JSP container developed by the Apache Software Foundation. Tomcat implements several Java EE specifications including Java Servlet, Java Server Pages (JSP), Java EL, and WebSocket, and provides a "pure Java" HTTP web server environment for Java code to run in. |
|