forhas
forhas

Reputation: 11991

Spring controllers vs HttpServlet performance-wise

I'm working on a java web app with a simple web layer based on HttpServlet (classes that inherit HttpServlet class). My app is a real-time app, meaning functionality is measured (among the rest) by response time.

I would like to use spring controllers (DispatcherServlet) instead of my current servlets. Should I expect the same performance?

Upvotes: 0

Views: 856

Answers (1)

Saqib Javed
Saqib Javed

Reputation: 177

Simple answer No

Spring Controllers are the "C" part of MVC and are based on Servlets; and spring's dispatcher servlet loads all information and forwards the request to matching/corresponding controller for request processing.

While servlets are the base of the java web application; there is minimal overhead there.

Upvotes: 2

Related Questions