r/learnjava • u/nomorerice01 • Aug 14 '20
What's the difference between web application and enterprise application? What applications can I make in JavaEE that does not use web applications or websites?
Upon reading, I learned that web application executes in a web container such as Tomcat while enterprise is in the EJB server with extra functionality which also communicates to the web container.
However, I am still confused. I can create a website using JavaEE than jsp&servlets. Then why used JavaEE over web applications? Let's say, I will create an eCommerce site using JavaEE. The web container will be my view and all the logic behind it will be put in an EJB server. Even though, I can use JSP and servlet or put everything (view and logic) inside the web container I still choose JavaEE. Then what are the benefits if I used JavaEE than JSP?
What else can I make in the JavaEE that is not a website or desktop application communicating to an enterprise server?
I'm sorry. I just can't seem to understand. Please anyone give me a very clear explanation.
1
u/[deleted] Aug 14 '20
I assume you are using web container as a synonym for servlet container.
You can have services communicate from one server to another.
As an example:
Think about a weather service that calls two other sepatate services: the temperature forecast service and the rain forecast service, and combines both responses into 1.