Servlet and JSP

Total Post:113

Points:791
 276  View(s)
Ratings:
Rate this:

Difference between Servlet and JSP ?

  1. Post:140

    Points:984
    Re: Servlet and JSP

    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  

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!