Multiple choice technology

Identify the advantages of JSP over Servlet.

  1. Embedding of Java code in HTML pages

  2. Platform independence

  3. Creation of database-driven Web applications

  4. Server-side programming capabilities

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

JSP's primary advantage over Servlets is allowing Java code to be embedded directly in HTML using scriptlets and expressions. In Servlets, HTML must be embedded within Java strings using out.println(), making HTML-heavy pages cumbersome. JSP reverses this; HTML is the primary content with Java interspersed where needed.