RDBMS Questions and Answers – Servlets and JSP

This set of RDBMS Multiple Choice Questions & Answers (MCQs) focuses on “Servlets and JSP”.

1. The _______ specification defines an application programming interface for communication between the server and the application program
a) Java Servlet
b) JDBC
c) Java Applet
d) Java Swing
View Answer

Answer: a
Explanation: The java servlet specification defines an application programming interface for communication between the server and the application program. The HttpServlet class in Java implements the servlet API specification.

2. State true or false: Servlets are used to generate dynamic responses to HTTP requests.
a) True
b) False
View Answer

Answer: a
Explanation: Servlets are used to generate dynamic responses to HTTP requests. The task of a servlet is to process a request dynamically.

3. Which of these functions is not a part of the servlet lifecycle
a) Checking if an instance of servlet exists or not
b) Invoking the service method of the servlet
c) Shutting down the servlet
d) Pausing the servlet for a given period of time.
View Answer

Answer: d
Explanation: Pausing the servlet for a given amount of time is not a part of the servlet lifecycle. A servlet can be checked, invoked and destroyed but it cannot be paused.
advertisement
advertisement

4. Which of the following application servers do not provide built in support for servlets?
a) Tomcat server
b) Glassfish
c) JBoss
d) None of the mentioned
View Answer

Answer: d
Explanation: All of the mentioned application servers provide built in support for servlets. Glassfish and Tomcat are the most prominently used application servers.

5. What is the full form of JSP?
a) Java servlet program
b) Java server pages
c) Java server pages
d) Java server program
View Answer

Answer: b
Explanation: The full form of JSP is Java Server Pages. It is a scripting language that allows HTML programmers to mix static HTML with dynamically generated HTML.

6. While using Javascript, the browser parses the HTML code into a tree like structure defined by a standard called ________
a) DOS
b) DOD
c) DOM
d) DON
View Answer

Answer: c
Explanation: While using Javascript, the browser parses the HTML code into a tree like structure defined by a standard called Document Object Model (DOM). Javascript code can modify the tree structure to carry out certain operations.

7. Javascript is used to create dynamic webpages using technologies that are collectively called ________
a) Ajax
b) Thor
c) Dynamo
d) Achilles
View Answer

Answer: a
Explanation: Javascript is used to create dynamic webpages using technologies that are collectively called Ajax.
advertisement

8. What are scripting languages?
a) The programming languages that pre decide the web page content
b) The programming languages that are simpler and offer same protection
c) The programming languages that trade off simplicity for protection.
d) None of the mentioned
View Answer

Answer: b
Explanation: Scripting languages are those languages that are simpler with enriched user interface features but offer the same protection as that of Java.

9. What are client side scripting languages?
a) The languages designed to be executed on the client’s web browser
b) The languages designed to be executed on the server
c) The languages designed to reduce the amount of data costs incurred at the client end
d) The languages designed to be executed in multiple computers paralleled with each other
View Answer

Answer: a
Explanation: Client side scripting languages are those languages that are designed to be executed on the client’s web browser. These languages provide constructs that can be embedded with an HTML document.
advertisement

10. State true or false: Executing programs at the client side is slower than executing programs on the server
a) True
b) False
View Answer

Answer: b
Explanation: Executing programs on the client side is faster than executing programs on the server which includes sending every interaction to the server.

Sanfoundry Global Education & Learning Series – RDBMS.

To practice all areas of RDBMS, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.