PrepAway - Latest Free Exam Questions & Answers

Which method would be used to call a registered servlet with the following attributes?

Which method would be used to call a registered servlet with the following attributes?
Site = www.jcert.org
Web application name = testApp
Servlet URI = TestServlet

PrepAway - Latest Free Exam Questions & Answers

A.
getServletConfig().getServletContext().getRequestDispatcher(“http://www.jcert.org/testApp/TestSe
rvlet”).forward(req,res);

B.
getServletConfig().getServletContext().getRequestDispatcher(“TestServlet”).forward(req,res);

C.
getServletConfig().getServletContext().getRequestDispatcher(“/TestServlet”).forward(req,res);

D.
getServletConfig().getServletContext().getRequestDispatcher(“/testApp/TestServlet”).forward(req,r
es);


Leave a Reply