Vidyalelo
Java Programming · all questions

Java Server and Servlet
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

70

Questions

2/4

Page

Pick an option on a question to see the right answer and solution.

Which HTTP method is used for updating data on the server in Java Servlets?

Select an option to see the answer and solution.

In Java Servlets, what is the purpose of the `HttpServletRequestWrapper` class?

Select an option to see the answer and solution.

What is the purpose of the `init-param` element in the `web.xml` file of a Java web application?

Select an option to see the answer and solution.

Which of the following is true about session tracking in Java Servlets?

Select an option to see the answer and solution.

In Java Servlets, what is the purpose of the `HttpServletResponseWrapper` class?

Select an option to see the answer and solution.

What is the primary function of the `destroy()` method in Java Servlets?

Select an option to see the answer and solution.

What is the purpose of the `web.xml` `` element in a Java web application?

Select an option to see the answer and solution.

In Java Servlets, what is the purpose of the `HttpServletResponseWrapper` class?

Select an option to see the answer and solution.

What does the term "servlet context" refer to in Java Servlets?

Select an option to see the answer and solution.

In Java Servlets, what is the purpose of the `javax.servlet.Filter` interface?

Select an option to see the answer and solution.

Which part stores the program arguments and startup parameters?

Select an option to see the answer and solution.

What is the storage capacity of single cookie?

Select an option to see the answer and solution.

Which of the following code is used to get an attribute in a HTTP Session object in servlets?

Select an option to see the answer and solution.

How is the dynamic interception of requests and responses to transform the information done?

Select an option to see the answer and solution.

What is debugging an application which runs on another java virtual machine on another machine?

Select an option to see the answer and solution.

Which of the following code retrieves the body of the request as binary data?

Select an option to see the answer and solution.

Which key helps to step out of the caller of currently executed method?

Select an option to see the answer and solution.

Which of the below is not a javascript framework for UI?

Select an option to see the answer and solution.

What is the difference between servlets and applets?
i. Servlets execute on Server; Applets execute on browser
ii. Servlets have no GUI; Applet has GUI
iii. Servlets creates static web pages; Applets creates dynamic web pages
iv. Servlets can handle only a single request; Applet can handle multiple requests

Select an option to see the answer and solution.

What happens when the value of variable change?

Select an option to see the answer and solution.