What is Dojo?
Dojo is a popular open source AJAX library made available under the BSD and Academic Free licenses. It provides many useful browser widgets such as tree, table, etc. Dojo is currently being introduced into the Daytrader application and the Geronimo administration console to enhance the user interface. See http://dojotoolkit.org/ for more about Dojo.
How is Dojo typically used in a web application?
AJAX developers usually incorporate the Dojo library into their applications by making a copy of its static files (javascript, css, gifs, etc) in their webapp and referencing those files from their servlets and JSPs. The downside of this approach is that each application has a separate copy of the AJAX library, increasing the server's overall footprint and preventing browsers from using a single copy of the library files from their caches. Another downside is that the AJAX library can't be upgraded or otherwise managed independently from the web applications that contain it. For example, a web application deployed across a cluster might want to serve up the static Dojo files from a central location. Hosting the Dojo files in a separate webapp can help work around these problems.
How can Dojo be used in Geronimo?
Geronimo's Dojo plugin provides web applications with a shared copy of the Dojo files. Installing the plugin makes the Dojo files available in the context "/dojo", and the HTML for referencing the library would look like:
<script type="text/javascript" src="/dojo/dojo.js"></script> Â
The Geronimo administration console uses the Dojo plugin. Therefore if the administration console is installed then the Dojo files should already be available in the server. Otherwise, you can manually install the Dojo plugin by following these steps:
<provide instructions for installing the plugin (need to determine plugin repository)>
To see which version of Dojo is currently available in the server look for "dojo.version" in /dojo/dojo.js.
<provide info about the Dojo/JSON plugin>