SCWCD : The Web Container Model Mock Exam Practice Questions
Question -1
If a servlet generates an error that is not handled by the error_page mechanism, the container must ensure to send a response with status ______?.
options
A)500
B)404
C)400
D)401
Correct answer is : A
Explanations : If a servlet generates an error that is not handled by the error_page mechanism , the container must ensure to send a response with status 500.
Question -2
Web applications can be packaged and signed into a Web Archive format (WAR) file using the standard Java archive tools.
When packaged into such a form, a META-INF directory will be present which contains information useful to Java archive tools.
Any requests from the client to access the resources in META-INF/ directory MUST be returned with a ________ ?
options
A)SC_NOT_FOUND
B)SC_INTERNAL_SERVER_ERROR
C)ESC_BAD_REQUEST
D)None of the above
Correct answer is : A
Explanations : Any requests from the client to access the resources in META-INF/ directory MUST be returned with a SC_NOT_FOUND (404) response.
Question -3
The classes in _________ directory must be available to the application class loader ?
options
A)/WEB-INF/classes/
B)/WEB-INF/lib/classes/
C)/root/classes/
D)/root/lib/classes/
Correct answer is : A
Explanations : The /WEB-INF/classes/ directory for servlet and utility classes.
The classes in this directory must be available to the application class loader.
|