Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Java EE Web Application?

Tags:

jakarta-ee

I want to ask a question about the java web application. When I start to learn the JSP, I always hear about the Java EE web application. But I don't know the actually meaning of that word. Can anyone explain this word to me? Thank you.

like image 801
Questions Avatar asked Sep 15 '10 07:09

Questions


1 Answers

A web application differs from other types of applications like desktop applications (Photoshop, for instance) in that most of the computation is done on a remote computer, and only the display data is sent to the user's machine. Normally, the user interface will be written in some kind of "web" technology - HTML/JavaScript/flash etc, and will be viewed using a web browser, hence the name.

In order for that to work, the remote machine (server) has to run an application which listens for client requests, does some computation and return the reply to the user. For instance, when you buy a book from amazon, the purchase button send a request to a remote application to process your order and return a confirmation message.

There are many details involved in this process - the application has to listen to requests, it has to handle failures, maybe connect to a database and many more things. Because much of this work is similar in any web application, it is common practice to use something called an application server to do that work for you.

An application server is an application that knows how to run other applications and do some of their work for them. So now, when the user sends a request to the web application, the applications server gets it, maybe extracts some data from it and validates it, and then tells your application to handle the business logic. This way you don't have to worry about things like communication whenever you write a web application.

There are web servers for all kinds of technologies. For instance - IIS is a web server for .Net web applications.

Java EE is actually a collection of specifications (which is a fancy word for a bunch of interface and orders how to implement them) which define how you should write your java application and how a vendor should implement his application server so that they can work together. The "container" someone mentioned here before is a Java EE name for the vendor's application server.

You said you are learning how to write JSPs. When you write a JSP, you actually implement a spec that defines how to write a Java EE display component, which can be translated to HTML. Your application server (Tomcat/JBoss/BEA whatever) knows what to do with your JSP in order to produce the wanted HTML and then send it to the user.

like image 82
Hila Avatar answered Oct 20 '22 15:10

Hila