问题
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 ?
回答1:
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.
来源:https://stackoverflow.com/questions/11954498/how-to-use-post-method-in-wicket