what is the difference Between JSP and Servlet?

Recommended Answers

All 2 Replies

servlet is a Java class implementing the javax.servlet.Servlet interface that runs within a Web or application server's servlet engine, servicing client requests forwarded to it through the server.
A Java Server Page is a slightly more complicated beast. JSP pages contain a mixture of HTML, Java scripts (not to be confused with JavaScript), JSP elements, and JSP directives.
The elements in a Java Server Page will generally be compiled by the JSP engine into a servlet, but the JSP specification only requires that the JSP page execution entity follow the Servlet Protocol.

The Difference of JSP and Servlet

1. JSP is a web scripting language that can generate dynamic content, which is a Java Servlet program, has also been prepared to create dynamic web content.
2. Servlets comparison, JSP run faster.
3. JSP can be compiled into Java Servlets's.
4. It easier than in Java in the JSP code.
5. JSP and Java Servlets are usually used in combination today.

commented: This answer is just useless. -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.