jeudi 20 juillet 2017

POST-redirect-GET Pattern in Servlet

In the PRG pattern, when I send redirect from doPOST method to the doGET do I need to append the parameters in the redirect link? I understand that I have a FORM with POST method, this will send the data to the given Servlet in the action attribute of the form. The Servlet's doPOST method then will send a redirect to the same servlet's doGET(if this is a good practice, or it should be a different servlet?), then in the doGET I Forward the request with the RequestDispatcher. I also use filters so I assume that I can give "rules" about the Filter in the web.xml using the tag, so it will filter only in specific situations.

Aucun commentaire:

Enregistrer un commentaire