0

when I want to redirect in my page to other I use this method exception:

    throw new RedirectToUrlException("/login/j_security_check?j_username=" + username + "&j_password=" + pass);

problem is that this information are visible in browser. How I can send this and use POST method ?

hudi
  • 15,555
  • 47
  • 142
  • 246

1 Answers1

3

POST redirects are a somewhat esoteric edge case with most browsers. Wicket's RedirectRequestHandler currently only supports HTTP codes 301 and 302. POST redirect would require 307, which will also show a warning to the user.

That said, what you are trying to do is inherently unsafe. Do not ever send a password back to the client.

Long story short: Wicket doesn't support this, and you shouldn't be doing this anyway.

Carl-Eric Menzel
  • 1,246
  • 7
  • 18
  • so how should I do this ? There must be some options how to do this in other way but I dont know it – hudi Aug 16 '12 at 11:32
  • That really depends on what you want to do. What is the purpose of that redirect? To me this looks like it needs to be redesigned. – Carl-Eric Menzel Aug 16 '12 at 12:31