Developing Applications for the Java EE 7 Platform Ed 1 Quiz Questions and Answers

What is confidentiality?

Answer :
  • Property that information is not made available or disclosed to unauthorized individuals

Which method is required for using the URL rewriting mechanism of implementing session support?

Answer :
  • HttpServletResponse.encodeURL()

Given: 10. public void service(ServletRequest request, 11. ServletResponse response) { 12. ServletInputStream sis = 13. // insert code here 14. } Which retrieves the binary input stream on line 13?

Answer :
  • request.getInputStream();

Which of the following action variable is used to include a file in JSP?

Answer :
  • jsp:include

Which object stores references to the request and response objects?

Answer :
  • pageContext

What temporarily redirects response to the browser?

Answer :
  • response.sendRedirect(URL)

In a servlet, how can you retrieve the existing session if it exists?

Answer :
  • request.getSession(false);

Which of the following code retrieves the body of the request as binary data?

Answer :
  • DataInputStream data = request.getInputStream()

How are java web applications packaged?

Answer :
  • war

Which page directive should be used in JSP to generate a PDF page?

Answer :
  • contentType