Double forward in one servlet

前端 未结 2 419
抹茶落季
抹茶落季 2021-01-28 06:08

I have one JSP page that have a form. When the button in this form is pushed, id called my MainServlet. This is an example of my Servlet

/***** MainServlet *****         


        
2条回答
  •  天涯浪人
    2021-01-28 06:54

    Once a request has been forward, the remaining codes are not executed. Its same like calling a return statement twice one after another in a method. If you want both forwards to work. You should use conditions, depending upon which, one of the forward statement will be executed.

提交回复
热议问题