I am trying to call ordinary servlet via spring (I am using gwt-sl
library and GWTHandler class) and requestbuilder in GWT (POST method).
When I am trying to do that without setting any header a get error:
1. Content-Type was 'text/plain; charset=utf-8'. Expected 'text/x-gwt-
rpc

so I am changing header Content-Type to text/x-gwt-rpc by
httpbuilder.setHeader("content-Type", "text/x-gwt-rpc");

but then I am get error :
2. Character Encoding is '(null)'.  Expected 'charset=utf-8'

so I am trying like you suggest: httpbuilder.setHeader("content-Type",
"text/x-gwt-rpc; charset=utf-8");

but I get error:

3. encodedRequest cannot be empty

that is why I wanted to know header name for Character Encoding to be
not of the part content-type

but when I look closer to those errors numbers 1 and 2 comes from
com.google.gwt.user.server.rpc.RPCServletUtils
and number 3 from org.gwtwidgets.server.spring.GWTRPCServiceExporter
caused by com.google.gwt.user.server.rpc.RPC.decodeRequest

I am new at spring and GWT :)


On 29 Kwi, 12:25, Thomas Broyer <[email protected]> wrote:
> On 28 avr, 16:33, "[email protected]" <[email protected]> wrote:
>
> > My question is how to change Character Encoding in requestBuilder. I
> > have managed so far to change Content-Type to "text/x-gwt-rpc" and I
> > can't change charset.
>
> > I have tried
> > RequestBuilder httpbuilder = new RequestBuilder(RequestBuilder.POST,
> > URL.encode(url));
> > httpbuilder.setHeader("content-Type", "text/x-gwt-rpc");
>
> > but now I don't know what header name is for character encoding
>
> httpbuilder.setHeader("content-Type", "text/x-gwt-rpc;
> charset=utf-8");
>
> (though i'm not sure what you're trying to do here...)
--~--~---------~--~----~------------~-------~--~----~
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