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

前端 未结 6 1834
暖寄归人
暖寄归人 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:04

    No, it's not possible. The only (dirty) workaround I see is to forward to an internal page containing a hidden form (with method POST) and a JavaScript script submitting this form.

提交回复
热议问题