Displaying content in JSP page, want but not other Html tags

[nobr]I have a page and am reading files and displaying the contents of the files onto the page in a <div> Oneissue is that in the file the end of line are \n or \r\n whichever operation system. I replaced those with
no problem. Now my issue is that I display that in the JSP page:

<c:out value="${filecontents}" escapeXml="false" />

I use escapeXml so that
will add the line breaks. Now my issue is that the file might contains other HTML tags that I want to display simply as text - I don't want the browser to render the other HTML tags.

Is there a way to do that? Would I have to replace HTML tags with something special?[/nobr]

[731 byte] By [smiles78a] at [2007-11-27 2:39:45]
# 1

Hmm... your file contains HTML tags, but you don't want the browser to interpret them as HTML tags, right? So the way to do that is to use escapeXml="true" in your c:out element.

But then that also escapes the
tags that you carefully put in there. And you don't want that. You want the browser to interpret those as HTML tags.

I guess you can't have it both ways. Can you do something like outputting one line of the file at a time with <c:out ... escapeXml="true"> followed by

?

DrClapa at 2007-7-12 3:02:00 > top of Java-index,Java Essentials,Java Programming...