-1

I am building rest services in Spring. If I am not wrong, web services are servlets i.e. internally they get converted into servlet.

So, just wondering, does all service methods(methods annotated with @RequestMapping) gets converted into separate servlet?

Anand
  • 20,708
  • 48
  • 131
  • 198

1 Answers1

2

Actually nothing's converted into Servlet.

Spring brings its own DispatcherServlet - which maps to "everything below" a given path.

All @Controllers will be invoked by that DispatchServlet and not directly by the servlet engine (like tomcat or jetty). So theres no need to convert to servlet.

Jan
  • 13,738
  • 3
  • 30
  • 55