Hi Ilan,
thanks for your reply.
The problem is, I use the table data from my database in the jsp fashion
way '<%=myVariable%>' , so your solution will only work if I use your
method in conjunction with the PrintWriter out .
Mayby there's another more JSP conform solution.
Ilan Belehssen schrieb:
>
> You should use a function to encode your text in HTML.
> I didn't found it in the package (this is amazing) so you have to write it.
>
> This function should look like this :
> (it does the same thing of ASP's Server.HTMLEncode)
>
> String HTMLEncode (String str)
> {
> String res = "";
>
> if (str == null) return res;
>
> for(int i=0; i< str.length() ;i++)
> {
> char c = str.charAt(i);
> switch(c)
> {
> case '<': res += "<"; break;
> case '>': res += ">"; break;
> case '&': res += "&"; break;
> default: res += c;
> }
> }
>
> return res;
> }
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html