First, when we configure the DWR3, we can test in the browser to see if our configured DWR is effective
http://localhost:[Your server port number, default does not write as 80]/[Web name]/dwr/, enter the name of the DWR script you defined earlier, as shown below:
When you click the first remote you will see the following page:
Such a page shows that your DWR basic configuration succeeded, why said the basic success, because it shows you this service component all the way, but one thing is, only you annotate the @remotemethod method you have the right to access directly on the page, Otherwise it will be an error;
Then we can really use the page to access the background method, before you have to in your *.js file contained in the *.html file to introduce the following three files, as follows:
<script type= ' text/javascript ' src= ' Web path/dwr/engine.js ' >
</script><script type= ' text/ JavaScript ' src= ' Web path/dwr/util.js ' >
</script>
This is the DWR default must be cited, the principle does not explain, the following to refer to the one you want to call this service component (Java Class), the equivalent of JS file, that is, dwr the back end of the service class equivalent to directly into the front-end JS file, Inside the method is equivalent to this JS file inside the method, as long as the reference in can be directly called, as follows:
<script type= ' text/javascript ' src= ' Web path/dwr/interface/remote.js ' >
</script>
Then down can be in our JS directly call this remote class inside the method, as follows:
(function ($) {remote.setenabledwrupdate ();} ;
Remote Inside the Setenabledwrupdate () is the previous one of the Sessionexpiredparam class Setenabledwrupdate () method;
The front end of the call to the end of the OK, the next is how the back end of the call to the front end, in advance to everyone play through the ^_^;