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 += "&lt";  break;
        case '>': res += "&gt";  break;
        case '&': res += "&amp"; 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

Reply via email to