---
title: "Servlet and JSP"  
description: "Servlet and JSP"  
author: "Anonymous User"  
published: 2018-07-18  
updated: 2018-07-18  
canonical: https://www.mindstick.com/forum/34624/servlet-and-jsp  
category: "android apps"  
tags: ["android", "java"]  
reading_time: 2 minutes  

---

# Servlet and JSP

[Difference](https://www.mindstick.com/articles/157114/good-news-or-bad-news-and-the-difference-is) between [Servlet and JSP](https://www.mindstick.com/forum/23342/what-are-jsf-servlet-and-jsp-and-what-is-difference-between-them) ?

## Replies

### Reply by Prakash nidhi Verma

Servlet :

servlet is a Java class which is used to extend the capabilities of servers that host by webs servers and applications accessed by means of a request-response model.they can respond to other types of requests too. HTTP-specific servlet classes are defined by Java Servlet technology.

- Servlet is a java code

- Writing code for servlet is

- harder than JSP as it is html in java

- Servlet plays a controller role in MVC approach

- Servlet is faster than JSP

- Servlet can accept all protocol requests.

- In Servlet, we can override the service() method

\

JSP :

A JSP is a text document which contains two types of text

- static data : HTML,XML,SVG and WML

- dynamic datain : JSP elements

- JSP is a html based code

- JSP is easy to code as it is java in html

- JSP is the view in MVC approach for showing output

- JSP only accept http requests

- In JSP we cannot override its service() method

- In JSP session management is automatically enabled

- just need to click the refresh button its fast


---

Original Source: https://www.mindstick.com/forum/34624/servlet-and-jsp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
