Servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model.
JSP is a Java technology that helps software developers serve dynamically generated web pages based on HTML, XML or other document types.
| Key Criteria | Servlet | JSP | 
|---|---|---|
| Definition | Servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model. | JavaServer Pages is a Java technology that helps software developers serve dynamically generated web pages based on HTML, XML or other document types. | 
| Developed By | Sun Microsystems. | Sun Microsystems. | 
| Released On | June 1997. | JSP released on 1999. | 
| Embedding | Servlet doesnt allow to embed java code in the HTML. | JSP allows to embed java code in the HTML. | 
| Content | Servlets are Java programs that are already compiled which also creates dynamic web content. | JSP is a webpage scripting language that can generate dynamic content. | 
| Purpose | Servlet act as a controller. Servlet is used for bussiness logic. | JSP act as a view. JSP is basically used for presentation. | 
| Speed | Servlets are faster than jsp. | JSP is slower than Servlet. | 
| Validation | Clientside validation is possible in servlets. | Clientside validation is not possible in JSP. | 
No comments:
Post a Comment