Thursday, April 7, 2011

How to programatically send input to a java app running in a browser window?

Consider the most excellent wordle tag cloud generator:

Entering text into the "textform" textarea and clicking the go button starts up the wordle java applet on that page. No traffic goes back to the server.

How can I cause this to happen programmatically? No hack too cheap!!

background for this question:

From stackoverflow
  • If you mean starting it programmatically from a browser page, you can use the same type of JavaScript that that page uses, which calls the function Wordle.t() to start the applet.

    If you want to call it from a Java program, you can download the Wordle.class or jar file yourself, and call the functions directly.

  • I'm the creator of Wordle.

    In case anyone finds this page in the future, I thought it would be useful to explain that Wordle invokes its applet by constructing an applet tag with a huge <param> containing a sanitized version of whatever text you pasted in. It is the cheapest hack imaginable.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.