Posted By:
Robert_Lybarger
Posted On:
Friday, September 14, 2007 08:49 AM
If you're wanting the applet's call to be async so it behaves like most ajax calls made directly from the browser itself, you'll probably wind up making an HttpConnection to the address in question, but doing this in another Thread. You'll have to arrange for the applet's main thread to be notified when this second thread gets back its answers -- there are a few ways to do this, and I'm not discussing the whole realm of threaded java code here. When you get the response back, you'll have to decide if you want to handle the raw text-based response or convert to an XML document object model; for the latter, you'll need to explicitly load up a DOM object somehow, either via direct java code, or via some nicer third party tools like dom4j or jdom (or ...).