What's the difference between Servlets and Struts?
As I understand it, a servlet is a program that manipulates and returns information upon a request. Struts on the otherhand is a framework or database that a servlet can access in order to find out how it should handle a request. I don't work with struts or servlets much myself, just basics, but to me that seems to be the idea.
By means of Servlets you can deploy a function, procedure, service, etc. on the web that receives input data, elaborates results and returns output data. STRUTS is a programming framework that supports developers in implementing MVC pattern in their Web Applications.
Most broadly, a servlet is a class that handles an incoming request and provides a response. Struts is a higher-level framework that provides a different way of approaching a web application where you can worry less about a lot of the servlet details. It is built on servlets, because servlets are the base implementation of a web application in Java.
Join our real-time social learning platform and learn together with your friends!