Difficulty: Easy
Correct Answer: Java servlet.
Explanation:
Introduction / Context:
JSP (JavaServer Pages) provides a templating model where HTML (or other markup) is interleaved with server-side Java elements. Understanding the lifecycle clarifies deployment, performance, and debugging behavior in Java web applications.
Given Data / Assumptions:
Concept / Approach:
When a JSP is requested, the container translates the JSP into a Java source file that extends the servlet base classes. It then compiles this source into bytecode and loads it as a servlet. Subsequent requests run the compiled servlet class until the JSP is changed, at which point the container recompiles as needed. Thus, at runtime a JSP becomes a servlet, not an applet.
Step-by-Step Solution:
Verification / Alternative check:
Servlet container documentation describes JSP translation-phases and servlet lifecycle; IDE tools can show the generated servlet code for debugging.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
Java servlet.
Discussion & Comments