Choose the statement that best describes the relationship between JSP and servlets:

  1. Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime usage.

  2. JSP and servlets are unrelated technologies.

  3. Servlets and JSP are competing technologies for handling web requests. Servlets are being superseded by JSP, which is preferred. The two technologies are not useful in combination.

  4. JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime usage.


Correct Option: D
Explanation:

To answer this question, the user needs to have a basic understanding of JSP and servlets.

Option A is incorrect. Servlets and JSPs are separate technologies and are not compiled to each other.

Option B is incorrect. JSP and servlets are related technologies used for web development.

Option C is incorrect. Servlets and JSPs are complementary technologies that can be used together to handle web requests.

Option D is correct. JSPs are built on top of the Servlet API and are ultimately compiled down to servlets.

Therefore, the correct answer is:

The Answer is: D

Find more quizzes: