This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes JSP and the fly likes HTML Chars escape Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "HTML Chars escape" Watch "HTML Chars escape" New topic

HTML Chars escape

Kudret Serin
Ranch Hand

Joined: Aug 02, 2005
Posts: 167

I have a string which has HTML tags (like <br> <p> etc) in it.
When i write it with out.print() to output, i see bold text. But i want to see the <b> tag itself.
How can i escape?
Thanks in advance.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63552

Use the JSTL <cut> tag yo emit any strings that need to be HTML-escaped.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: HTML Chars escape
It's not a secret anymore!