you can even use HTML comments to hide evaluated results from jsp expressions partially when the page is rendered to the browser.
e.g.
`${empty requestScope.errors? "" : "<p id='errors'>Error(s)!
<ul>"}
<!--${requestScope.errors.stream().map(x -> "-->
<li>"x"</li>
<!--").toList()}-->
${empty requestScope.errors? "" : "</ul></p>"}`
the local variable x from requestScope.errors.stream().map(x->)
is still evaluated and passed to <li>"+=x+="</li>
output:
` Error(s)!
- Product must have a name
- Product must have a price
`
if the expressions are not in HTML comment tag, the "[]" symbol will appear due to .toList()
output without HTML tag:
`Error(s)!
[- Product must have a name
- Product must have a price
]
`
<
and>
with html codes, you can select text and pressctrl+K
– Peshitta