Oracle
1Z0-899 · Question #153
You have been contracted to create a web site for a free dating service. One feature is the ability for one client to send a message to another client, which is displayed in the latter client's…
The correct answer is B. <c:out value='${message}' /> C. <c:out value='${message}' escapeXml='true' />. See the full explanation below for the reasoning.
Question
You have been contracted to create a web site for a free dating service. One feature is the ability for one client to send a message to another client, which is displayed in the latter client's private page. Your contract explicitly states that security is a high priority. Therefore, you need to prevent cross-site hacking in which one user inserts JavaScript code that is then rendered and invoked when another user views that content. Which two JSTL code snippets will prevent cross-site hacking in the scenario above? (Choose two.)
Options
- A<c:out>${message}</c:out>
- B<c:out value='${message}' />
- C<c:out value='${message}' escapeXml='true' />
- D<c:out eliminateXml='true'>${message}</c:out>
- E<c:out value='${message}' eliminateXml='true' />
How the community answered
(19 responses)- B84% (16)
- D11% (2)
- E5% (1)
Community Discussion
No community discussion yet for this question.