I am using eclipse, Java, and seting up Ajax-DWR. When I run my program nothing happens. I belive This is cause by warning in my xml file. I tried looking on google but didn't found any thing.

files Path, jar files, etc...:

Take a look at the attached image.

Johe2.png

I am getting a following warning / error in DWR.XML File:
The file cannot be validated as the host "www.getahead.ltd.uk" is currently unreachable.
DWR.XML
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
    "http://www.getahead.ltd.uk/dwr/dwr20.dtd">
<dwr>
  <allow>
    <create creator="new" javascript="ex01">
      <param name="class" value="DWR.ex01"/>
    </create>
  </allow>
</dwr>
ex01.HTML File
<html>
<head>
  <script type="text/javascript" src="dwr/interface/ex01Script.js"></script>
  <script type="text/javascript" src="dwr/engine.js"></script>
  <script type="text/javascript" src="dwr/util.js"></script>
  <script type="text/javascript" src="ex01.js"></script>
</head>
<body>
  <p> Name: <input type="text" id="demoName"/>
  <input value="Send" type="button" onclick="update()"/> <br/>
  Reply: <span id="demoReply"></span> </p>
</body>
</html>
ex01.JAVA File
package DWR;

public class ex01 {
public String sayHello(String name) {
    return "Hello, " + name;
    }
}
ex01.JS File
    function update() {
        name = dwr.util.getValue("demoName");

        ex01Script.sayHello(name, updateData);
    }

    function updateData(data) {
        dwr.util.setValue("demoReply", data);
    }

Recommended Answers

All 3 Replies

the host "www.getahead.ltd.uk" is currently unreachable

what is it aboiut that mesage that you don't understand?

if its unreachable than how can I fix it or work around it?

It's probbaly unreachable becuase it doesn't exist... .ltd.uk does not look like a normal UK URL. They normally end with .co.uk

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.