nerdexam
Oracle

1Z0-899 · Question #143

Your web application views all have the same header, which includes the <title> tag in the <head> element of the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and…

The correct answer is E. <jsp:include page='/WEB-INF/jsp/header.jsp'>. See the full explanation below for the reasoning.

Question

Your web application views all have the same header, which includes the <title> tag in the <head> element of the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and put it into a single JSP called /WEB-INF/jsp/header.jsp. However, the title of each page is unique, so you have decided to use a variable called pageTitle to parameterize this in the header JSP, like this: 10. <title>${param.pageTitle}<title> Which JSP code snippet should you use in your main view JSPs to insert the header and pass the pageTitle variable?

Options

  • A<jsp:insert page='/WEB-INF/jsp/header.jsp'>
  • B<jsp:include page='/WEB-INF/jsp/header.jsp'>
  • C<jsp:include file='/WEB-INF/jsp/header.jsp'>
  • D<jsp:insert page='/WEB-INF/jsp/header.jsp'>
  • E<jsp:include page='/WEB-INF/jsp/header.jsp'>

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    11% (3)
  • D
    4% (1)
  • E
    78% (21)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice