I want to display a text called
"welcome<to>Jsp"
In page source also i'm seeing as "welcomeJsp"
But in HTML its displaying as "welcomeJsp" alone. Please guide me.
You have to escape these characters..
welcome<to>Jsp
I would advice using Apache's StringEscapeUtils class(available in org.apache.commons.lang ) function escapeHtml()
for escaping HTML.
StringEscapeUtils.escapeHtml("welcome<to>Jsp")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With