Vani
Vani

Reputation: 11

Integrating DOJO into an Existing STRUTS Application

I am trying to integrate DOJO to my existing struts application. Listed below are the steps I followed.

1.Downloaded DOJO 1.4, copied dijit,dojo and dojox folders under my application folder jsp->js>DOJO

  1. copy paste "dialog via mark up example" (http://www.dojotoolkit.org/reference-guide/dijit/Dialog.html#dijit-dialog)

  2. When I run the application, I am getting javasript error dojo undefined.

What I am missing? Also where is dojo.xd.js? I don't see it under dojo folder

Upvotes: 1

Views: 978

Answers (2)

Sandeep
Sandeep

Reputation: 547

Simple alternative is to use the DOJO from CDN - Content Distribution Network (Multiple repositories which has all dijit,dojo and dojox folders . So you don't have to copy anything). Use the following code if you want to use the latest DOJO.

<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js"></script>

If you want a specific version, then

<script type="text/javascript" src="http://o.aolcdn.com/dojo/<version>/dojo/dojo.xd.js"></script>

Upvotes: 0

smencer
smencer

Reputation: 1053

You are probably missing a reference to the dojo script on your page.

http://www.dojotoolkit.org/reference-guide/quickstart/install.html#quickstart-install

You need to add a <script src="path to where you put dojo"></script> to your page.

Upvotes: 1

Related Questions