(ii) Initial parameter with name "debug" and value "10"’ (iii) Support asynchronous operation?

Which code snippet specifies the metadata for a servlet with:
(i) url mapping “/mytest”‘
(ii) Initial parameter with name “debug” and value “10”‘ (iii) Support asynchronous operation?

Which code snippet specifies the metadata for a servlet with:
(i) url mapping “/mytest”‘
(ii) Initial parameter with name “debug” and value “10”‘ (iii) Support asynchronous operation?

A.
@WebServlet(“/mytest”)
@InitParam(name-“debug” va1ue = “10”)
@Asynchronous
public class TestServlet extends HttpServlet {}

B.
@WebServlet (“/myset”)
@WebParam(name = “debug” value = “10”)
Public class testServlet {}

C.
@WebServlet (urlPatterns = { / “mytest”},
Initparams = {@InitParam (name = “debug”, value = “10”) }, supportAsync = true) public class TestServlet extends HttpServlet {}

D.
@WebServlet (urlPatterns = { / “mytest”},
Initparams = {@InitParam (name = “debug”, value= “10”) }, asyncSupported = true) public class TestServlet extends HttpServlet {}

E.
@WebServlet (urlPatterns = { / “mytest”},
Initparam = @WebInitParam (name = “debug”, value = “10”), supportAsync = true) public class testServlet {}



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Ouadie

Ouadie

The Correct answer is : D

Arturo

Arturo

D is correct but it must be “@WebInitParam”

Rudi

Rudi

D is the correct answer

Allan Santos

Allan Santos

D.
It is the only option that use the correct asynchronous operation property.