Rhinohide

Rhinohide provides applets with an interface to the Web document,
through a familiar Java binding of the DOM.
The code is still in beta and coverage is incomplete,
but full support is provided for Core Level 1
and partial support for Core Level 2 and 3, XML, Events, Traversal and Range.

Set-Up

Requires jre/lib/plugin.jar, or equivalent, from your JDK.
It contains the JSObject, Java-to-JavaScript bridge.
Include it in your compile-time classpath (the Plug-In includes it automatically at runtime).

Use

In your Web page, there are two encoding requirements.
One is to disable the browser's in-memory caching;
the second is to add a
MAYSCRIPT attribute on the applet tag.
The necessary JavaScript and HTML will look something like this, in the Web page:

Limitations

Where the implementation is incomplete (see the table above)
the missing parts will throw UnsupportedOperationException at run time.
They are marked ‘Not yet coded’ in the API.
(But often, they can be coded in-line, as described further below.)

Rhinohide is a DOM interface, as opposed to a full DOM implementation,
and therefore inherits the limitations of the browser.
For instance, running under Internet Explorer (IE),
XML and the higher levels of Core will be unavailable,
simply because IE 7 does not implement them.

Test coverage is still limited.
The best tested platform is Mozilla (Firefox and such) on Linux.
Also tested are IE and Mozilla on Windows. To test a particular platform of your own,
please use the on-line demo/test pages. Here is a summary of current, outstanding bugs:

See Also

As a Java-to-JavaScript DOM interface,
Rhinohide is comparable to the Common DOM API of the Java Plug-In.
The Common DOM API has a fuller implementation of HTML Level 1;
but Rhinohide extends to higher Core levels, and covers additional features, like XML.

Another comparable implementation is the Java DOM API of the Blackwood Project.
But it appears to be inactive.

Copyright 2006-2007, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Textbender Software"), to deal in the Textbender Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Textbender Software, and to permit persons to whom the Textbender Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Textbender Software. THE TEXTBENDER SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE TEXTBENDER SOFTWARE OR THE USE OR OTHER DEALINGS IN THE TEXTBENDER SOFTWARE.