Hi,

das ist die einfachste doPost Methode:

        public static void doPost(String url, String postData) {
                RequestBuilder builder = new RequestBuilder(RequestBuilder.POST,
url);
                try {
                        Request response = builder.sendRequest(postData, new
RequestCallback() {

                                public void onError(Request request, Throwable 
exception) {
                                        logger.debug("doPost failed...");
                                }

                                public void onResponseReceived(Request request, 
Response response)
{
                                        logger.debug("doPost: " + 
STATUS_CODE_OK + " OK");
                                }
                        });
                } catch (RequestException e) {
                        Window.alert("Failed to send the request: " + 
e.getMessage());
                }
        }

Ich mach's mit doPost("myUrl","param1=a&param2=b");

Auf der Serverseite kommt request, aber alle Parameter sind null.

    protected void doPost(HttpServletRequest _req, HttpServletResponse
_resp)
    throws ServletException, IOException
    {
        PrintWriter writer = _resp.getWriter();
        String param1 = _req.getParameter("param1");
                writer.println("param1 = " + param1);
        String param2 = _req.getParameter("param2");
                writer.println("param2 = " + param2);
...
    }

Was mach ich falsch?

Viellen Dank im Voraus

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to