how can i show some HTML code on a page
hi how can i show some HTML code on a page without the browser converting it to htmlFor example<INPUT TYPE="text" SIZE="15" MAXLENGTH="128" NAME=qt> I would like this to be displayed as code not as an Input box TIA
[269 byte] By [
JavaDen] at [2007-9-26 2:09:36]

Hi Tia,In your html file, instead of putting a < or > signtype in #&60; and #&62; That will get it to display as text and not get interpreted by the browser as a tag.Rick
rsal at 2007-6-29 8:59:30 >

i.e., in general, for characters that would otherwise be interpreted by the browser, use their corresponding entity references.For a full list of such character entity references see http://www.w3.org/TR/html4/sgml/entities.html
Here's what I usually use:<%!
private String entities(String s) {
StringBuffer sb = new StringBuffer();
char ch;
for(int i=0;i<s.length();i++) {
ch = s.charAt(i);
if (ch == '>') {
sb.append(">");
} else if (ch == '<') {
sb.append("<");
} else sb.append(ch);
}
return sb.toString();
}
%>
And then to use:<%
...
displayLine = entities(htmlLine);
...
%>