Translation: The solution思路 for setting up DWR's GET request. Explanation of the concept: To set up a GET request in DWR (Direct Web Remoter), you need to ensure that the configuration and setup follow certain principles. Below is an approach or "solution思路" (solution idea) for this: 1. **Configuration**: Ensure DWR is properly configured in your `web.xml` and `dwr.xml`. This includes mapping the DWR servlet and defining the remoted Java classes or methods. 2. **Enable GET Requests**: By default, DWR uses POST requests. To enable GET requests, you can modify the `dwr.xml` file by adding the attribute `allowGetForJavaScript=true` to the `` section. Example: ```xml true ``` 3. **Client-Side Call**: Once GET requests are enabled, you can call the server-side method using a URL-based GET request from the client side. 4. **Security Considerations**: Be cautious when enabling GET requests as sensitive data could be exposed in the URL. Always validate inputs and avoid transmitting sensitive information via GET. This structured approach ensures that the DWR GET request is set up correctly while considering security and configuration aspects.

by kpkmd54461 on 2012-03-04 17:56:19

Here is the translation of your text into English:

---

By default, DWR uses POST requests, but now I need to use GET requests. The context startup failed due to previous errors. According to online resources, to make a GET request, you just need to set the `verb` to "GET". For example:

```javascript

Remote.method(params, {

callback: function(data) { ... },

verb: "GET"

});

```

However, after setting this property, I checked using Firefox's Firebug and it still showed as a POST request. Another suggestion I found was to set the `httpMethod` to "GET", like this:

```javascript

Remote.method(params, {

callback: function(data) { ... },

httpMethod: "GET"

});

```

But with this configuration, the program throws an error even before reaching the backend: "GET Disallowed". Has anyone encountered this issue?

---

### Supplementary Information:

User **william_ai** asked: "What version of DWR are you using?"

I now know that my version is 2.x, and I need to set the `httpMethod` property. However, it always throws an error: "GET Disallowed". Could this be because the URL contains sensitive data that is being intercepted? Things like `sessionId` are passed through the URL.

---

### Solutions and References:

1. What version of DWR are you using?

2. You can refer to this resource for sending GET/POST requests in Java: [Java - How to send GET/POST requests](http://www.myexception.cn/java-web/41743.html)

3. Related topics:

- C++ programming solutions

- Approaches to parsing AMF protocol

- Handling thread configurations in Java Spring

---

If you need further clarification or assistance with resolving this issue, please let me know!