Hobione's Weblog

Living & Breathing in Web 2.0 Era

‘dwr’ is undefined

I was trying to run DWR’s demo example and here what I missed.

I forgot to add these following pieces of code in my index.jsp page

<script type=”text/javascript” src=”dwr/engine.js”></script>
<script type=”text/javascript” src=”dwr/util.js”></script>
<script type=”text/javascript” src=”dwr/engine.js”></script>

Second, I forgot to add commons-logging-1.0.4.jar in my class path

And very last I forgot to add

<script type=”text/javascript” src=”dwr/interface/Demo.js”> </script>

Since I had a Demo.java bean

So, summary is, DWR’s http://getahead.org/dwr/getstarted has good documentation but needed little more polishing for people like novice who never used DWR. Now everything works like a champ and I can have a good night sleep.

 

Advertisements

December 12, 2007 Posted by | Ajax Libraries, DWR | 4 Comments