Which of the following lines of code, in the doPost() method of a servlet, uses the URL rewriting approach to maintaining sessions? (Choose one)
a. out.println("<a href=' "+response.encodeURL("/servlet/XServlet")+" '>Click here</a>"));
b. out.println("<a href=' "+request.rewrite("/servlet/XServlet")+" '>Click here</a>"));
c. out.println(response.rewrite("<a href='/servlet/XServlet'>Click here</a>"));
d. request.useURLRewriting();
Answer: A
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.