Difference between Apache Struts and Java EE?

I am currently learning Java EE, more specifically Servlets and .jsp. In my programming, I already use the Model-View-Controller to write code. And as I understand it, Apache Struts is just a server like Tomcat. So what is Apache Struts for Java, Java EE, and Servlet classes in Java EE?

+3
source share
3 answers

Struts is NOT another server. This is the application framework. It is built on top of the JSP architecture and servlets. So this is an abstraction of the servlet environment.

Using an infrastructure like Struts has a number of advantages, such as: many common application features are already created, so you don’t need to do them yourself. Features such as validation. It also makes you work in accordance with some best practices, in this case MVC.

Under the covers, Struts implement several servlets to do the job. You developer should not write servlets. Instead, you can focus on business logic.

+5
source

Struts is a library for creating web applications; it is not a server in itself. A JSP / Servlet container (e.g. Tomcat) is required to operate. See the Struts technology tutorial .

Java EE - , . Tomcat Java EE, , Java EE, -.

basic architecture JEE diagram
(: sun.com)

+5

Wikipedia :

Apache Struts is an open source website application framework for developing Java EE Web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC) architecture.

+1
source

Source: https://habr.com/ru/post/1721279/


All Articles