How to forward the servlet output to jsp page?
That means the result will be displayed in the JSP page.
To forward a request/response from from a servlet to something else (e.g. JSP) you'll want to look at the RequestDispatcher class. The ServletContext class has a method to get a dispatcher, which can be called from within a servlet.
For example (within a servlet's doPost
/doGet
method):
RequestDispatcher rd = getServletConfig().getServletContext()
.getRequestDispatcher("/jsp/myfile.jsp").forward(request,response);