当我在servlet中处理完并且结果合法时,我需要将响应重定向到另一个JSP页面,比如web内容文件夹中的welcome.jsp
。我该怎么做呢?
例如:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
// Some processing code here ...
// How do I redirect to another JSP here when I'm ready?
} catch (Exception e) {
throw new ServletException(e);
}
}