初学DWR 问题
我照着网上例子做的.............
我启动 tomcat 的时候报告错误 信息: Probably not an issue: bean is not available so the helloWorld.Service co..........
然后 我在 JSP里面这么些的
<script type="text/javascript">  
   function firstDwr(){  
	    service.sayHello("liuyi");  
	}  
   function  pri(data){
          alert(data);
     }
  </script>
  <body>
<input type="button" name="button" value="测试" onclick="firstDwr()"/>
</body>
但是 就是 不出现 警告对话框 ...................
------解决方案--------------------我照着网上例子做的.............  
我启动 tomcat 的时候报告错误 信息: Probably not an issue: bean is not available so the helloWorld.Service co..........  
然后 我在 JSP里面这么些的  
<script type="text/javascript">  
 function firstDwr(){  
   service.sayHello("liuyi");  
}  
 function  pri(data){  
       alert(data);  
   }  
</script>  
<body>  
<input type="button" name="button" value="测试" onclick="firstDwr()"/>  
</body>  
但是 就是 不出现 警告对话框 ...................
这个代码不是java,而是javascript(简写js)
如果你只想弹出对话框,改成下面的,就OK了
<script type="text/javascript">  
 function firstDwr(){  
   alert("警告");
}  
</script>  
<body>  
<input type="button" name="button" value="测试" onclick="firstDwr()"/>  
------解决方案--------------------我晕!~怎么楼上这些人都喜欢答非所问的啊!~!
<script type="text/javascript">  
 function firstDwr(){  
   service.sayHello("liuyi");  
}  
 function  pri(data){  
       alert(data);  
   }  
</script>  
<body>  
<input type="button" name="button" value="测试" onclick="firstDwr()"/>  
</body>  
楼主的错误是没有回调函数
你只要把上面的代码改成:
<script type="text/javascript">  
 function firstDwr(){  
   service.sayHello("liuyi",pri);  
}  
 function  pri(data){  
       alert(data);  
   }  
</script>  
<body>  
<input type="button" name="button" value="测试" onclick="firstDwr()"/>  
</body>  
就可以了!~!楼主注意红色部分就是回调函数!~
------解决方案--------------------
------解决方案--------------------这个就是少个 回调函数而已
<script type="text/javascript">
 function firstDwr(){
   service.sayHello("liuyi",pri);
}
 function  pri(data){
       alert(data);
   }
</script>
<body>
<input type="button" name="button" value="测试" onclick="firstDwr()"/>
</body>  
还要注意添加
<script src="dwr/interface/JsCheckUser.js"></script>
<script src="dwr/engine.js"></script>
<script src="dwr/util.js"></script>
------解决方案--------------------<script type="text/javascript">  
 function firstDwr(){  
   service.sayHello("liuyi",pri);  
}  
 function  pri(data){