A client is to be sent to a servlet in a separate servletContext. Which of the following is the best
way to accomplish this?
A.
getServletConfig().getServletContext().getRequestDispatcher(“http://www.testapp.com/OtherApp/s
ervlets/OtherServlet”).forward(req,res);
B.
response.sendRedirect(“/OtherApp/servlets/OtherServlet”);
C.
getServletConfig().getServletContext().getRequestDispatcher(“/Other/servlets/OtherServlet”).forw
ard(req,res);
D.
response.sendRedirect(“http://www.testapp.com/OtherApp/servlets/OtherServlet”);