This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Receiving URL content to applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Receiving URL content to applet" Watch "Receiving URL content to applet" New topic

Receiving URL content to applet

Josh Reev

Joined: Feb 17, 2011
Posts: 8
I need to run a javascript page from my app and receive the page that results from the script on a String. This is my code:

However this only results in stuff like$HttpInputStream@1ce669e, etc..
I also tried

This gives me the pure HTML code.
Rob Spoor

Joined: Oct 27, 2005
Posts: 19697

It's the browser (read: client) that interprets the JavaScript. Your code would need to take over that role after it's read the pure HTML code. That's not a trivial task. Perhaps a third party library like Lobo can help you.

How To Ask Questions How To Answer Questions
GeeCON Prague 2014
subject: Receiving URL content to applet