redirect jsp from servlet RequestDispatcher

后端 未结 5 1852
傲寒
傲寒 2020-12-03 15:59

I want to redirect JSP page from one servlet. All JSP pages are under Web Content. not under Web-INF. I have a problem of calling that JSP pages.

5条回答
  •  执念已碎
    2020-12-03 16:24

    Use SendDirect if you want to work with JSP pages

    response.sendRedirect("/thankyou.jsp");
    

    This is simpe thing to use than RequestDispatcher which doesn't work with doPost().

提交回复
热议问题