sending a url with parameters, as a url parameter

22 views
Skip to first unread message

andrew

unread,
Nov 8, 2011, 5:44:19 PM11/8/11
to Google Web Toolkit
I am calling a servlet from GWT client code using RequestBuilder.

In the request (a POST) I am passing some request data...

builder.sendRequest(postData, new RequestCallback()....

In postData, one of the url parameters is called "returnToUrl"

This "returnToUrl" has url parameters, and would be like this

returnToUrl = "http://my.server/add?pn=a&pd=b";

When I call the servlet, the second (and later) parameters (pd=b in my
example) gets interpreted as request parameters for the servlet, not
as part of the returnToUrl parameter, and hence get lost....

It is being URL encoded, but of course that doesn't change the '?' and
'&' characters.

Q. How can I pass a url with multiple parameters, as a url parameter
itself ?

Jens

unread,
Nov 8, 2011, 5:57:40 PM11/8/11
to google-we...@googlegroups.com
You have to encode the url you want to pass to the server. 


-- J.
Reply all
Reply to author
Forward
0 new messages