nerdexam
Oracle

1Z0-899 · Question #18

You are creating a JSP page to display a collection of data. This data can be displayed in several different ways so the architect on your project decided to create a generic servlet that generates…

The correct answer is D. <c:import var='dataString' url='/WEB-INF/data'>. See the full explanation below for the reasoning.

Question

You are creating a JSP page to display a collection of data. This data can be displayed in several different ways so the architect on your project decided to create a generic servlet that generates a comma delimited string so that various pages can render the data in different ways. This servlet takes on request parameter: objoctID. Assume that this servlet is mapped to the URL pattern: /WEB-INF/data. In the JSP you are creating, you need to split this string into its elements separated by commas and generate an HTML <ul> list from the data. Which JSTL code snippet will accomplish this goal?

Options

  • A<c:import varReader='dataString' url='/WEB-INF/data'>
  • B<c:import varReader='dataString' url='/WEB-INF/data'>
  • C<c:import var='dataString' url='/WEB-INF/data'>
  • D<c:import var='dataString' url='/WEB-INF/data'>

How the community answered

(48 responses)
  • A
    4% (2)
  • B
    10% (5)
  • C
    2% (1)
  • D
    83% (40)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice