Can sendRedirect() act as a post method instead of get? - jsp/servlets

前端 未结 6 1858
暖寄归人
暖寄归人 2020-12-29 07:18

I have a simple form which accepts a username and a password. I have to use sendRedirect() method for the page to redirect to one page if log in is valid and to

6条回答
  •  时光取名叫无心
    2020-12-29 08:06

    No, a HTTP redirect will always use GET for the target page.

    However, POST data are not much safer than GET data anyway. The user can still tamper with them. Store them in the session instead.

提交回复
热议问题