Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Apache Struts and Java EE?

I'm currently learning Java EE, or more specifically, Servlets and .jsp. In my programming, I already employ the Model-View-Controller model to write my code. And as far as I've googled, Apache Struts is just a server like Tomcat. So, what exactly is Apache Struts, in relation to Java, Java EE, and Servlet classes in Java EE?

like image 366
Catfish Avatar asked Dec 22 '22 08:12

Catfish


1 Answers

Struts is NOT another server. It's an application framework. It is built on top of JSP and Servlet architecture. So it is an abstraction of the servlet environment.

Using a framework like Struts has some advantages such as: many common features of applications are pre-built so you don't have to do them yourself. Features such as validation. It also forces you to work according to some best practice philosophy, in this case MVC.

Under the covers Struts implement a few servlets to do the job. You the developer do not have to write servlets. You can focus on business logic instead.

like image 142
Vincent Ramdhanie Avatar answered Dec 31 '22 22:12

Vincent Ramdhanie