Announcement Announcement Module
Collapse
No announcement yet.
redirect problem with encoded query string Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • redirect problem with encoded query string

    Hello

    I use SpringMVC 3.04

    My Application help users to post links on social site. The posted link is sent as a query string parameter so it must be URLEncoded. For example:

    http://www.tumblr.com/share?s=&t=The....it%2Fgcnn&v=3

    So one of my controller make a redirect to the selected site in the return statement of a method.:
    return "redirect:http://tumblr.com/share?s=&t=title&u=http://smub.it/gcnn&v=3"
    In this case the posted URL in not Encoded and the target site issue an error.
    If I URLEncode the query string params value like this:
    return "redirect:http://tumblr.com/share?s=&t=title&u....it%2Fgcnn&v=3
    Spring re-encode the url (it encode the '%' char as %25) so the link becomes :
    http://tumblr.com/share?s=&t=title&u....it%2Fgcnn&v=3

    I try to put all query string parameters in the Model object and only return "redirect:http://tumblr.com/share", but the result is always the same

    How can I make it work fine????
Working...
X