Question ID 4661 | Which defines the welcome files in a web application deployment descriptor?
|
Option A | A. <welcome>
<welcome- file >/ welcome - jsp</welcome-file>
</welcome> <welcome>
<welcome-file>/index-html</welcome-file>
</welcome>
|
Option B | B. <we1come-file-list>
<welcome-file> welcome .jsp</welcome-file> <welcome-file>index.html</welcome-file> </welcome-file-list>
|
Option C | C. <welcome>
<welcome-file>welcome.jsp</welcome </we1come >
</welcome >
<welcome-file>index.html<//welcome-file>
</we1come >
|
Option D | D. <we1come-file-list>
<welcome-file> welcome .jsp</welcome-file> <welcome-file>/index.html</welcome-file> </welcome-file-list>
|
Option E | E. <welcome> <welcome-file> <welcome-name> welcome </welcome-name>
<location> welcome.jsp </location>
</welcome-file> <welcome-file>
<welcome-name>index</welcome-name>
<location> index </location>
</welcome-file> </welcome>
|
Correct Answer | B |
Question ID 4662 | 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?
|
Option A | A. @WebServlet("/mytest")
@InitParam(name-"debug" va1ue = "10") @Asynchronous
public class TestServlet extends HttpServlet {}
|
Option B | B. @WebServlet (“/myset”)
@WebParam(name = “debug” value = “10”) Public class testServlet {}
|
Option C | C. @WebServlet (urlPatterns = { / “mytest”},
Initparams = {@InitParam (name = “debug”, value = “10”) }, supportAsync = true) public class TestServlet extends HttpServlet {}
|
Option D | D. @WebServlet (urlPatterns = { / “mytest”},
Initparams = {@InitParam (name = “debug”, value = “10”) }, asyncSupported = true) public class TestServlet extends HttpServlet {}
|
Option E | E. @WebServlet (urlPatterns = { / “mytest”},
Initparam = @WebInitParam (name = “debug”, value = “10”), supportAsync = true) public class testServlet {}
|
Correct Answer | D |