geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo Development > Using Dojo in Geronimo
Date Fri, 26 Mar 2010 01:08:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=GMOxDEV&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/GMOxDEV/Using+Dojo+in+Geronimo">Using
Dojo in Geronimo</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~genspring@gmail.com">Shawn
Jiang</a>
    </h4>
     Updated dojo/dojo.js to dojo/dojo/dojo.js in the doc.
          <div id="versionComment" class="noteMacro" style="display:none; padding: 5px;">
     Updated dojo/dojo.js to dojo/dojo/dojo.js in the doc.<br />
     </div>
          <br/>
     <div class="notificationGreySide">
         <h2><a name="UsingDojoinGeronimo-WhatisDojo%3F"></a>What is Dojo?</h2>

<p>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.&nbsp;
Dojo is currently being introduced into the Daytrader application and the Geronimo administration
console to enhance the user interface.&nbsp; See <a href="http://dojotoolkit.org/"
rel="nofollow">http://dojotoolkit.org/</a> for more about Dojo.</p>

<h2><a name="UsingDojoinGeronimo-HowisDojotypicallyusedinawebapplication%3F"></a>How
is Dojo typically used in a web application?</h2>

<p>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.</p>


<h2><a name="UsingDojoinGeronimo-HowcanDojobeusedinGeronimo%3F"></a>How
can Dojo be used in Geronimo?</h2>

<p>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:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;script type=<span class="code-quote">"text/javascript"</span> src=<span
class="code-quote">"/dojo/dojo/dojo.js"</span>&gt;&lt;/script&gt;
</pre>
</div></div>
<p>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.</p>

<h2><a name="UsingDojoinGeronimo-HowcanItellwhichversionofDojoisinGeronimo%3F"></a>How
can I tell which version of Dojo is in Geronimo?</h2>

<p>To see which version of Dojo is currently available in the server look for "dojo.version"
in <a href="http://localhost:8080/dojo/dojo/dojo.js" rel="nofollow">http://localhost:8080/dojo/dojo/dojo.js</a>.</p>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/GMOxDEV/Using+Dojo+in+Geronimo">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=26256&revisedVersion=3&originalVersion=2">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/GMOxDEV/Using+Dojo+in+Geronimo?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message