Tuesday, June 23, 2009

Loading applets into portlets

There used to be an old JavaAppletPortlet in Jetspeed 1 but it fell into disuse and hasn't been updated. After trying to resurrect it for a while I realised that all you needed was an instance of FilePortlet, and then point it to a bit of HTML containing an applet. All a portlet does at the end of the day is generate a bit of HTML. So where do you put the applet to make it see it? I eventually got it to work out of an applets folder that I added to the root directory of the dostf webapp. Then I can refer to it as codebase="http://localhost:8080/dostf/applets/". That wasn't intuitively obvious, but it worked. Now the problem is just that I am defaulting back to PING when HTML probing fails, but silently. In reality not many hosts will support HTTP, and I ought to display nothing or a message saying that the host doesn't support that protocol, not revert to PING and pretend that it is really HTTP. But I'll fix that tomorrow.

No comments:

Post a Comment