Home > Index > Using Dojo in Geronimo |
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.
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 need 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.
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 from any web application deployed in that server would look like:
The debug views in the Geronimo administration console use the Dojo plugin. So if the debug views are installed and activated then the Dojo files should already be available in the server at the "/dojo" context. Otherwise, you can manually install the Dojo plugin using the deploy.sh command line tool or the Plugins portlet in the administration console.
To see which version of Dojo is currently available in the server look for "dojo.version" in http://localhost:8080/dojo/dojo/dojo.js.
Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2011, The Apache Software Foundation, Licensed under ASL 2.0. |