What is wrong in the below code? public void doPost(HttpServletRequest req, HttpServletResponse res) { try { String language = req.getParameter("language"); res.sendRedirect("/doc/"+language+”/index.html”); } catch (Exception e) { } }

  1. Request Redirection is vulnerable and not a good practice

  2. Exception is not logged

  3. Input parameter “language” is not validated

  4. Option 1 AND Option 2

  5. Option 1 AND Option 3

  6. Option 2 AND Option 3


Correct Option: E

Find more quizzes: