Home > MCQs > IT & Programming > JSP And Servlets MCQs

JSP And Servlets MCQ

JSP And Servlets Quick Quiz

Question 1 of 10
  • The correct way to create a string in Java is:

    Answer & Explanation

    Correct Answer: String var_str = "this";

    Note: This Question is unanswered, help us to find answer for this one

  • A container invokes ____ method before taking care of any requests.

    Answer & Explanation

    Correct Answer: jspInit()

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following method is called before the page service any requests?

    Answer & Explanation

    Correct Answer: jspInit()

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following methods is abstract in HttpServlet?

    Answer & Explanation

    Correct Answer: It has no abstract methods

    Note: This Question is unanswered, help us to find answer for this one

  • How does container process a JSP page after compilation?

    Answer & Explanation

    Correct Answer: Servlet

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following is not a valid java bean (POJO) scope in JSP?

    Answer & Explanation

    Correct Answer: response

    Note: This Question is unanswered, help us to find answer for this one

  • When using HTML forms which of the following is true for POST method?

    Answer & Explanation

    Correct Answer: POST method sends data in the body of the request

    Note: This Question is unanswered, help us to find answer for this one

  • Which one is not a part of the JSTL library group?

    Answer & Explanation

    Correct Answer: HTML

    Note: This Question is unanswered, help us to find answer for this one

  • If submit a form without mentioning the method type(get or post) and called servlet. which method will invoke? doGet() or doPost().

    Answer & Explanation

    Correct Answer: By default it is a GET request

    Note: This Question is unanswered, help us to find answer for this one

  • If req is a reference to an HttpServletRequest and there is no current session, what is true about req.getSession() ?

    Answer & Explanation

    Correct Answer: Invoking req.getSession(true) will return a new session

    Note: This Question is unanswered, help us to find answer for this one

  • JSP And Servlets Quick Quiz

    battery

    Poor Results!

    You need a lot of improvement.

    Just don't give up!

    Correct Answers: 0/10

    Start Practicing with our MCQs given below.