How to use post method in wicket

笑着哭i 提交于 2019-12-20 06:02:41

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!