Page: 2
2. The Structure and Deployment of Web Applications
Q5. Given that www.example.com/SCWCDtestApp is a validly deployed Java EE web application and that all of the JSP files specified in the requests below exist in the locations specified.Which two requests, issued from a browser, will return an HTTP 404 error? (Choose two.) A. http://www.example.com/SCWCDtestApp/test.jsp B. http://www.example.com/SCWCDtestApp/WEB-INF/test.jsp C. http://www.example.com/SCWCDtestApp/WEB-WAR/test.jsp D. http://www.example.com/SCWCDtestApp/Customer/test.jsp E. http://www.example.com/SCWCDtestApp/META-INF/test.jsp F. http://www.example.com/SCWCDtestApp/Customer/Update/test.jsp Answer: B, E Q6. Which two about WAR files are true? (Choose two.) A. WAR files must be located in the web application library directory. B. WAR files must contain the web application deployment descriptor. C. WAR files must be created by using archive tools designed specifically for that purpose. D. The web container must serve the content of any META-INF directory located in a WAR file. E. The web container must allow access to resources in JARs in the web application library directory. Answer: B, E Q7.Click the Task button. Given a servlet mapped to /control, place the correct URI segment returned as a String on thecorresponding HttpServletRequest method call for the URI: /myapp/control/processorder. 
Answers: Q8. Given an HttpSession session, a ServletRequest request, and a ServletContext context, which retrieves a URL to /WEB-INF/myconfig.xml within a web application? A. session.getResource("/WEB-INF/myconfig.xml") B. request.getResource("/WEB-INF/myconfig.xml") C. context.getResource("/WEB-INF/myconfig.xml") D. getClass().getResource("/WEB-INF/myconfig.xml") Answer: C
Page: 2
1
2
3
4
5
6
|