For a very simple ajax name lookup, I'm sending an id from the client webpage to the server (Tomcat 5.5, Java 5), looking it up in a database and returning a string, which is assigned to a javascript variable back in the client (and then displayed).
The javascript code that receives the value is pretty standard:
//client code - javascr...
I am trying to include the library StringEscapeUtils and everything that I can find indicates that I can import the Apache Org page as follows:
<%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
however, I can only resolve the URL down to this:
<%@ page import="org.apache.commons.*" %>
and when I do that, the compile st...
I followed the instructions in http://stackoverflow.com/questions/3091359/install-apache-common-lang-2-5-in-eclipse to install apache common lang 2.5 in Eclipse.
Then we I use the class
import org.apache.commons.lang.StringEscapeUtils;
writer.printf("<firstname>%s</firstname>", StringEscapeUtils.escapeXml(mystring));
I got ClassNot...
This is what I'm doing:
public static String htmlToText(String inString)
{
String noentity=StringEscapeUtils.unescapeHtml(inString);
return noentity;
}
This is where I'm invoking it:
String html = "<html><body>string 1<br />—<p>string 2</p></body></html>";
String nohtml = Utility.htmlToText(html);
Log.i("NON HTML STRING...