Which HTTP method is used for updating data on the server in Java Servlets?
A. `GET`
B. `PUT`
C. `POST`
D. `DELETE`
Select an option to see the answer and solution.
In Java Servlets, what is the purpose of the `HttpServletRequestWrapper` class?
A. To manage JavaBean events
B. To wrap an existing `HttpServletRequest`
C. To execute SQL queries
D. None of These
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?
A. To create JavaBeans
B. To execute SQL queries
C. To define initialization parameters for a servlet
D. To define JavaBean properties
Select an option to see the answer and solution.
Which of the following is true about session tracking in Java Servlets?
A. Sessions can only be tracked using cookies
B. Sessions are not supported in Java Servlets
C. Sessions are tracked using SQL queries
D. Sessions can be tracked using cookies, URL rewriting, and hidden form fields
Select an option to see the answer and solution.
In Java Servlets, what is the purpose of the `HttpServletResponseWrapper` class?
A. To wrap an existing `HttpServletResponse`
B. To create JavaBeans
C. To manage JavaBean properties
D. To execute SQL queries
Select an option to see the answer and solution.
What is the primary function of the `destroy()` method in Java Servlets?
A. To handle HTTP requests
B. To create JavaBean properties
C. To define JavaBean lifecycle
D. To clean up resources and finalize the servlet
Select an option to see the answer and solution.
What is the purpose of the `web.xml` `` element in a Java web application?
A. To define JavaBean properties
B. To execute SQL queries
C. To define a filter that can be applied to servlet requests and responses
D. To create JavaBeans
Select an option to see the answer and solution.
In Java Servlets, what is the purpose of the `HttpServletResponseWrapper` class?
A. To manage JavaBean properties
B. To wrap an existing `HttpServletResponse`
C. To execute SQL queries
D. None of These
Select an option to see the answer and solution.
What does the term "servlet context" refer to in Java Servlets?
A. The context in which JavaBean properties are defined
B. The context in which SQL queries are executed
C. The environment in which a servlet runs
D. The context in which JavaBeans are created
Select an option to see the answer and solution.
In Java Servlets, what is the purpose of the `javax.servlet.Filter` interface?
A. To define JavaBean properties
B. To execute SQL queries
C. To create JavaBeans
D. To perform filtering tasks on requests and responses
Select an option to see the answer and solution.
Which part stores the program arguments and startup parameters?
A. debug configuration
B. run configuration
C. launch configuration
D. project configuration
Select an option to see the answer and solution.
What is the storage capacity of single cookie?
A. 2048 MB
B. 2048 bytes
C. 4095 bytes
D. 4095 MB
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?
A. session.getAttribute(String name)
B. session.alterAttribute(String name)
C. session.updateAttribute(String name)
D. session.setAttribute(String name)
Select an option to see the answer and solution.
How is the dynamic interception of requests and responses to transform the information done?
A. servlet container
B. servlet config
C. servlet context
D. servlet filter
Select an option to see the answer and solution.
What is debugging an application which runs on another java virtual machine on another machine?
A. virtual debugging
B. remote debugging
C. machine debugging
D. compiling debugging
Select an option to see the answer and solution.
Which of the following code retrieves the body of the request as binary data?
A. DataInputStream data = new InputStream()
B. DataInputStream data = response.getInputStream()
C. DataInputStream data = request.getInputStream()
D. DataInputStream data = request.fetchInputStream()
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?
A. Vaadin
B. AngularJS
C. KendoUI
D. Springcore
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
A. i, ii, iii are correct
B. i, ii are correct
C. i, iii are correct
D. i, ii, iii, iv are correct
Select an option to see the answer and solution.
What happens when the value of variable change?
A. changed value pop on the screen
B. variable changes are printed in logs
C. dump of variable changes are printed on the screen on end of execution
D. variable tab shows variables highlighted when values change
Select an option to see the answer and solution.