If you go to http://localhost:8080/dwr - can you execute your class's JavaScript from that page?
Matt On 10/8/07, Martin Ravell <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having a play with Appfuse 2 and DWR but without much luck and was > wondering if someone could help. > > I thought I'd start with a simple demo and see if I could get it to work > within the confines of a clean Appfuse project. The demo is from > http://getahead.org/dwr/examples/text. > > > My dwr.xml looks like this: > > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE dwr PUBLIC > "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" > "http://getahead.org/dwr/dwr20.dtd"> > > <dwr> > <allow> > <create creator="new" javascript="Demo"> > <param name="class" value="com.rave.ChessChat.Demo"/> > </create> > </allow> > </dwr> > > > The JSP page looks like this: > > <%@ include file="/common/taglibs.jsp"%> > > <script type='text/javascript' src='/dwr/engine.js'></script> > <script type='text/javascript' src='/dwr/util.js'></script> > <script type='text/javascript' src='/dwr/interface/Demo.js'></script> > > <script type='text/javascript'> > > function update() { > var name = dwr.util.getValue("demoName"); > Demo.sayHello(name, function(data) { > dwr.util.setValue("demoReply", data); > }); > } > > </script> > > <p> > Name: > <input type="text" id="demoName"/> > <input value="Send" type="button" onclick="update()"/> > <br/> > Reply: <span id="demoReply"></span> > </p> > > > The Demo.java looks like this: > > package com.rave.ChessChat; > > public class Demo > { > public String sayHello(String name) > { > System.out.println("Bolocks"); > return "Hello, " + name; > } > } > > > > I can URL the page and it displays OK but nothing happens when I hit the > Send button. Any ideas on what more I need to get this to go? > > > Regards > Marty > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]