File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 63844

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!