Difference between servlet and web service

前端 未结 7 744
死守一世寂寞
死守一世寂寞 2020-12-07 08:29

What is the difference between these 2? I found few results on google nothing conclusive.

Here is a follow up question:

Say I create spring mvc web app ann

7条回答
  •  [愿得一人]
    2020-12-07 09:00

    Web services operate on a higher level than servlets. Servlets are API which is simple and provides capabilities to write server side components.

    For example RESTfull is a Web Service which contains many other "functionality" along with servlet. To deploy, we may define the web.xml as -

    
    jersey-serlvet
    com.sun.jersey.spi.container.servlet.ServletContainer
    
        com.sun.jersey.config.property.packages
        jersey.rest.test
    
    1
    

    which is none but a servlet

提交回复
热议问题