[Solved] Redirect a JSP request to itself after executing in a Servlet


Since you just want to refresh the current page,ajax is a better choice for you.

For you current design,both forward and redirect are okay,but something need to pay attention:

  1. if you use redirect,you can set parameters via the url

  2. after forward or redirect,you need to query the exits comments,which means that you had can either redirect to a new url and query data, or query the data before forward.

2

solved Redirect a JSP request to itself after executing in a Servlet